From 83b36aaaf146325af2d93dfbaf21eccba91a5d74 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 18:15:18 +0100 Subject: Chams: exact material styles, GUI dropdown, viewmodel hookup - world_find_material now tries the exact requested style first (resident, then FindMaterial) before falling back to debugwhite/vgui white. The old candidate scan returned vgui/white for every style, so all materials looked flat. - Add a real CK_DROPDOWN control (overlay list, outside-click close, config save) and use it for the Chams material selector. - Chams viewmodel toggle included in config/UI. --- CONTEXT.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index c95095b..9233517 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -111,6 +111,10 @@ vocabulary / decisions. - **Category**: sidebar group. Movement, Combat, Visuals, Weapons, System. - **Card**: per-feature panel. Header always shows Active + Bind; body is a collapsible set of settings. +- **Dropdown**: `CK_DROPDOWN` row with a value button; clicking opens an + overlay list below the row (above it near the window bottom). Clicking an + option sets the value and saves the config; clicking elsewhere closes it. + One dropdown is open at a time; it is not clipped by the card/content rect. - **Text layout**: measured with `ISurface::GetTextSize` and wrapped to the available width. Card headers, control rows, info rows, tooltips and toasts grow/wrap instead of truncating; there is no ellipsis truncation. The config @@ -293,16 +297,15 @@ vocabulary / decisions. materials ignore ColorModulate. The shared material's flag and colour are restored to (false, white) after the draw. - Material lookup walks the `IMaterialSystem` list (`world_find_material`), with - `FindMaterial` (slot 71) as the fallback. The style index selects: - 0 `models/debug/debugwhite`, 1 `debug/debugwireframevertexcolorignorez`, - 2 `vgui/white_additive`, 3 `debug/debugtranslucentsinglecolor`, - 4 `vgui/white`; if the requested style is unavailable it falls back to the - first available debugwhite candidate. The chosen material name is logged. + `FindMaterial` (slot 71) as the fallback. The **exact requested style** is + tried first (resident, then loaded on demand), and only if that fails does it + fall back to `models/debug/debugwhite`/`vgui/white`. Styles: Flat, Wireframe, + Additive glow, Solid, White. The chosen material name is logged. - `Viewmodel (hands/weapon)` also applies the override to entities whose class contains `viewmodel` or whose model path is `.../v_...`. The viewmodel gets only the normal-depth pass (no ignorez). - Feature is off by default; `[chams] active/bind/walls/viewmodel/material/r/g/b`, - with Through walls, Viewmodel, Material (0..4) and colour in the Visuals + with Through walls, Viewmodel, a Material dropdown and colour in the Visuals card. - This is a flat material override, not stencil outlines; depth handling is the simple ignorez/normal two-pass. -- cgit v1.2.3