Skip to content

feat(hud): menus as a list on the left, W S to choose, hold E to pick - #404

Draft
sivert-io wants to merge 49 commits into
masterfrom
feat/hud-left-menu
Draft

sivert-io wants to merge 49 commits into
masterfrom
feat/hud-left-menu

Conversation

@sivert-io

Copy link
Copy Markdown
Contributor

Hold E (v4) from the HUD kit canvas (page Hold E, boards "Alternative: Cybershoke layout" and "The whole match"): https://claude.ai/artifact/Nnt5WzmHAQbt8bXpoYKv97

  • ui_left (new at_ui panel): a list on the left, vertically centred, in our colours. The chosen row has an orange bar and tint; holding E slides the orange across it (0.6 s), then picks it. A close row is always last. Addon version 6 (needs a Workshop publish).
  • hud.so: every menu (any plugin's menu) is drawn there. W S move the row on the press, wrapping. Holding E picks the chosen row. In warmup the pawn is held still while the list is up (MOVETYPE_OBSOLETE, back to WALK when it closes); never in a live round. The cursor is only taken with the buy menu open, so W S reach the server.
  • Knife side pick: the same list; the team's current side comes first.
  • Hold chip (#ui_hold): from the top right to right above the AT logo, with a pulsing orange border until E is held.

Draft: still to test in game on server-2 with a test addon.

🤖 Generated with Claude Code

sivert-io and others added 30 commits November 24, 2026 17:49
- at_ui gets a third panel, ui_left (gen_ui.py): a list on the left,
  vertically centred, in our colours. The chosen row has an orange bar and
  tint; holding E slides the orange across it, then picks it. A close row is
  always last. Addon version 6.
- hud.so draws every menu there (any plugin's), W S move the row on the
  press (wrapping), holding E picks the chosen row, and in warmup the pawn
  is held still while the list is up (never in a live round).
- The knife side pick is the same list; the side the team is on comes first.
- The hold chip moves from the top right to right above the AT logo and its
  border pulses until E is held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One server can mount a test copy of the HUD instead of the real one
(never both: players load the first one that has the files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
They are drawn as screens, not through hud.so's menu call, so the left
panel never reached them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eft; HUD scale applies

ParseButtonId only knew ui_card / ui_mid, so holding E on a ui_left row
(or clicking it) did nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ready, unpause and votes

- where=chip: no card, the hold chip above the AT logo says the first
  button and the count (green with color=live); holding E presses it.
  The ready state uses it: the ready card and pill are gone.
- Any card with hold=1 (pause, surrender vote, round replay vote) keeps
  its text but hides its buttons; the chip carries the first one.
- CSS: one look for every card (dark surface, thin orange border, 12 px
  corners, 3 px colour line; no brand row, wash or pixels).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Green read as "someone already won"; green means done or live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as none

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the match config names a captain for the knife-winning team, only
they get the side pick list and only their .stay/.switch counts; their
teammates see "<captain> is picking a side", and anyone else who types it
is told only the captain picks (knife.captain_only, every locale). No
captain set (scrims): anyone on the winning team picks, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…to forfeit? Type .menu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The ram drew about 3.5 px right and 6+ px low in CS2's ring, with its
bottom edge cut: CS2's SVG renderer seems to ignore the view box origin
(16.8 38.8). The paths are moved by that much; same picture either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, 400 px wide, no brand row

It was 532 px on the left, where the menu list now opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A player joining CT, with a bot kicked to make room, crashed server-2
twice: the skins plugin re-gave the player's weapons in the same tick
(WriteEnterPVS: GetEntServerClass failed for ent 300). player_team and
player_disconnect now start the same 96-tick quiet window as a round
restart; inside it the held weapons are repainted instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e enter pose)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cards no longer say "CT stays CT"

- match.live, the rules lines, the side pick line and the commands line go
  to chat only without the HUD: the LIVE and Sides cards say it.
- A scrim's knife winners are "Knife winners stay CT" / "start T".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As CT the circle still showed CS2's emblem with only icons/ui/ct_logo_1c
replaced; CS2 also has icons/ct_logo / t_logo. Same picture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ustified

- Logo SVGs back to the 'M70.038,207.776' number style, shifted to a 0,0 view box:
  CS2 fell back to its own emblem for 'M 53.238 168.976'.
- Side pick notice: 'You chose CT' / 'Opponents chose CT' (time-out: 'You start T');
  spectators keep the team line.
- Knife start: 'Win to pick your side'.
- Damage card: 'Dealt 100 damage', right-aligned against 'ROUND 1'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…...'

- Card title 'Match is live' (was 'Good luck, have fun').
- One line instead of three commands: 'Type [.menu] in chat to open the match menu and
  view commands'. cmd= takes a third part, text after the box (ui_*_kN_a, addon 7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…E chat tip

- Go-live card: '[.menu] in chat for commands' (was 'Type [.menu] in chat to open the
  match menu and view commands').
- #ui_hold right under the crosshair, where new players look (was above the AT logo).
- Warmup star tip every 60 s: 'Hold E to ready up.' (with the HUD) + the .menu tip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ld E: pick'

- hud.so: players who turn the custom HUD off (.hud off, or the platform through ru_hud_v1
  v1.4 set_player_off) get nothing from screen / menu / set_text / set_class; saved in
  <data_dir>/hud_off.txt. .menu answers them in chat with the commands. The match plugin's
  centre-panel / chat fallback for them comes next.
- Menu hint with arrows, one row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A round start closed the menu, and .menu was refused mid-round; a pause or an admin is needed
then too (Sivert, 2026-11-24). Menus keep their rows mid-round (W S, hold E, no cursor); other
screens still become chips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ire is one hit

- Header 'Dealt X · Took Y' (all damage taken that round).
- A row under your display name for damage you did to yourself (own grenades, fire, falls).
- Molotov / incendiary ticks count as one hit per attacker and victim, like CS2's own report
  (it said 'in 6' where CS2 said 3 for a grenade and a molotov).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
set_class writes that turn a class off go through for a player with the HUD off: the Hold E chip
stayed on screen because its off write was blocked too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retakes' 'Retake site B!' banner came through hud->menu and was drawn as a left list with
nothing but a Close row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Draft G (2026-11-24): 'PLAYED ON' left of the logo circle above CS2's health line, 'AUTO
TOURNAMENT' right of it below the line, both white, 52 px from the screen's middle so they
follow the centred circle at any aspect ratio.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sivert-io and others added 19 commits November 24, 2026 22:35
One screen id for both states, so the chip updates in place; the green (ready) chip moves 56 px
down over 0.35 s while its border and background turn green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at lines

.hud off (or the platform's player setting) on hud.so: the ready / knife / live panel goes to
them as the centre HTML, the go-live card too, and the chat lines the HUD replaced (match live,
the rules, the knife pick) go to them alone. Everyone else keeps the custom HUD and a quiet chat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
match.assign players and add_player ops carry 'hud' (match.defs.json $defs/hud). false turns the
custom HUD off for that player on hud.so (ru_hud_v1 1.4 set_player_off), as .hud off; true turns
it back on; no field leaves the player's own choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CS2 draws the team logo in the circle between health and ammo and loads it by name when needed.
The addon ships the ram at panorama/images/tournaments/teams/autotournament, a path CS2 never
loaded at startup, so it shows every time; the icons/ui/ct_logo_1c replacement only showed right
after a download. hud.so sets both team logos at load and at every map start; a match config's own
mp_teamlogo_* goes out later and wins. (Found by setting mp_teamlogo_1 navi, 2026-11-24.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chip moves over 1 s ease-out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hud/build.ps1 stamps the layout with the commit and build time (ui_dev, 'HUD <sha> <time>');
with readyup.cfg dev=1 hud.so shows it top right for every player, next to the server's hud.so
version and commit. Without dev it stays hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hud/images/team/atram.svg: the website's at-icon.svg (orange rounded square, the ram) for CS2:
view box from 0,0, the rounded square as a path instead of a clip path, fills and cubic curves only.
The scoreboard and team select show it (mp_teamlogo_1/2 atram).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…round start)

The mp_teamlogo cvars reach CCSTeam only at a round start, so in warmup the scoreboard kept CS2's
emblems until an mp_restartgame. Every 2 s hud.so writes 'atram' into m_szTeamLogoImage of the CT
and T teams when it is empty (a match's own logo stays).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hud/tools/gen_team_logo.py builds hud/images/team/atram.svg from the website logo: the orange
cut out (the horn's orange shape is a hole), the mouth black, the original stacking order (the eye
on the face), a thin orange outline of offset copies of every shape (CS2 draws no strokes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A solid disc inside the ring (the ring keeps the player's colour) with the team logo
file on it, over Valve's CT/T emblem, which CS2 caches at startup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In team select, dead or spectating CS2 has no badge for them to sit in (it draws the
watched player's avatar in that circle), so hud.so sets `on` on ui_badge and ui_wm
only while the player is alive on T or CT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… next to the HUD

- ui_badge / ui_wm: alive on T or CT shows both; watching a player puts the watermark
  on one line above CS2's spectator bar (spec); team select, the death cam and the
  buy menu show neither. The disc is a cool grey like Valve's.
- HUD-off players (.hud off) no longer get the old centre HTML panel or go-live card:
  the ready lines and reminders come in chat for them (ChatUnlessHud).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant