Repository navigation
Demos tab: the Demo File column can be dragged wider again (#801) - #806
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Live-tested unattended (game_probe, Brain account, DLL
Not run: the game's own Load Demo window and the Highlights tab (unchanged by the PR per its body). |
|
Updated with dev (brings in #803's DLL
|
Probe test on today's dev, together with #820 #806 #804 #816 #814 (2026-10-18)One local build of dev b7603c4 (with #734 kill-feed scale, #838, #840) + #820 + #806 + #804 + #816 + #814 merged (
Frames: |
Release note: Fixed: In the in-game DoD Studio window's Demos tab, the Demo File column can be dragged wider again, so long demo names are no longer cut off.
Closes #801
What changes
ResizeColumnToContents, which had the same fault).What GameUI showed (both builds)
CDemoPlayerFileDialogaddsdemonamewith flags 0 and the list's width; the 5-argumentAddColumnHeader(slot 134) turns flags 0 into a 20..10000 width range, and the drag handle is enabled.Dragger) keeps the position its column was added at (Dragger +0x70PRE,+0x74Anniversary), and its "ColumnResized" message sends that number.ListPanel::OnColumnResized(slot 189) looks the column up by position now in the column order.AddColumnHeadernever renumbers the handles (ResetColumnHeaderCommandsonly renumbers the headings' sort commands). Studio plays demos on other drives by their full path (no copy, no link) once the hook DLL makes that possible #779 inserted the icon column at position 0, so Demo File's handle still said 0, and dragging it resized the icon column, which is fixed at 22 (min = max), so nothing moved.CUtlLinkedListof 0x44-byte records atListPanel +0x78(PRE) /+0x7c(Anniversary), allocated count at +4. In a record:+0heading button,+4min width,+8max width,+0x10resizes-with-window,+0x14theDragger *,+0x1ctext type,+0x1dhidden,+0x1eunhidable. The order is aCUtlVector<unsigned char>at+0xa4/+0xa8, count at +0xc.FIXEDSIZE(withoutRESIZEWITHWINDOW) sets min = max = width, and min == max orFIXEDSIZEturns the handle's movable byte off.ListPanelmethod renumbers the handles, so the fix writes them: afteradd_demo_columnsadds its columns,renumber_draggerssets each column's handle to its position (bounds-checked against the record count). Offsets are three new fields in theBuildtable (list_columns,list_column_order,dragger_column).Other lists sharing the class
streaks_tab.rs) appends its columns afterdemoname(index 1 and on), so every handle already matches its position. It is not affected and is not changed.Verify script
tools/verify_studio_panel.pygets item 26 (verify_column_draggers). It reads off both builds: the 20..10000 range for flags 0;demoname's flags 0; the record list offset, stride 0x44 and allocated count (from the linked list's Alloc); theDragger *at record +0x14; the stored position in the Dragger after its vftable; the order offset; that nothingAddColumnHeadercalls renumbers the handles;OnColumnResizedlooking up by order, count and records; and the Dragger's "ColumnResized" message sending that field.It also fixes a bug in the script: the ComboBox check reused the name
okand overwrote the run's result, so an earlier FAIL could still print "OFFSETS VERIFIED". It now has its own name; no check was failing.Local checks
rustup run 1.98.1 cargo fmt --all --check: cleanrustup run 1.98.1 cargo clippy -p goldsrc-hooks --all-targets --locked -- -D warnings, on i686 and on the host: cleancargo test -p goldsrc-hooks --target i686-pc-windows-msvc --locked: 577 passed (new:each_drag_handle_names_its_column_position)python -I goldsrc-hooks/tools/verify_studio_panel.py: OFFSETS VERIFIED on PRE and POSTcargo build -p goldsrc-hooks --release --target i686-pc-windows-msvc --lib --locked: built; the DLL is inlocal\test-801\Live test plan (DLL
local\test-801\dodstudio_goldsrc_hooks.dll)Run on PRE (
Half-Life - PRE-Anniversary for Movies), then on POST (Half-Life - POST-Anniversary for Movies):🤖 Generated with Claude Code