F4 latches the side panel away, and holding Space slides it away - #53
HectorBailey wants to merge 1 commit into
Conversation
The original's keyboard has two ways to see the map under the side panel: F4 flips bit 7 of the display-options word and the panel slides off the left edge and stays there, and holding Space slides it away for as long as the key is down, unless the cursor is on the panel itself. The updater at 0x4948E0 gives the motion: each frame the position moves a quarter of what is left of the 125 pixels, never less than one, so the panel starts fast and eases in; the Panel sound plays as it leaves an end of its travel and Options as it arrives at one. RWE moves the panel and the minimap with the slide and lets the world viewport widen under them. The top and bottom bars stay where they are: their labels and figures sit at fixed positions, and sliding their tiles under them only garbled the two. Presentation only. Enter and h, the message bar and the share screen, wait for chat and sharing to exist; the issue stays open for them. Issue: #30 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJCbwC9MGZnM6erMDKptun
CubeB
left a comment
There was a problem hiding this comment.
The decode and the slide look right, and the branch builds and passes on MinGW Debug and Release merged onto current revival. Two things to change before merging, both mismatches between hit-testing and mapping:
GameScene::getUnitUnderCursor(GameScene_commands.cpp, theisCursorOverMinimap()branch) still builds its matrix withworldToMinimapMatrix(simulation.terrain, minimapRect).GameScene::getMouseTerrainCoordinate(same file) still usesminimapToWorldMatrix(simulation.terrain, minimapRect).
isCursorOverMinimap() now tests slidMinimapRect(). So with the panel mid-slide, or latched away with its last three pixels showing, a cursor over the visible minimap passes the hit test but is mapped as if the minimap had not moved. That puts the picked unit, or the point a right-click orders units to, up to 125 minimap pixels off. Both should use slidMinimapRect(), the same as the click-to-move-camera path in GameScene.cpp already does.
Smaller, and your call: the debug window's GUI checkbox (GameScene_render.cpp, ImGui::Checkbox("GUI", ...)) resets the inset to GuiSizeLeft. Turning the GUI back on with the panel slid leaves the world viewport's left edge wrong until the slide next moves. GuiSizeLeft - panelSlide there would keep it consistent.
🤖 Generated with Claude Code
For #30, the panel slide alone as agreed; the issue stays open for Enter and
h.The decode. The notes already had the key (F4 → bit 7 of the display-options word, read only by the updater at
0x4948E0) and the Space rule. The updater's motion, read for this: the position runs between 0 and0x7D; each frame it movesmax(1, remaining / 4)towards its target, so it starts fast and eases in; leaving an end plays "Panel" (0x505EBC) and arriving at one plays "Options" (0x502B38). Space is polled and drives the slide only while held and while the cursor is not on the panel's own gadget.What changed.
panelSlide,panelSlideLatchedandspaceDownonGameScene;updatePanelSlideruns each frame fromupdate, after the deferred menu actions, and moves the position as decoded, playing the two GUI sounds (PanelandOptions, now inInGameSoundsInfo).UiComponent::setPosition, which the panel's own render and hit-testing already honour; the minimap is drawn and hit-tested atslidMinimapRect(), including its detection rings; the world viewport's left inset shrinks by the slide so the map shows under it.onKeyDown/onKeyUp.Verified.
rwe_test: all 593 test cases pass (71751 assertions), Linux gcc-14 Debug.🤖 Generated with Claude Code
https://claude.ai/code/session_01PJCbwC9MGZnM6erMDKptun