show the available controls in a panel over the world
The panel decides nothing about what the controls are: it asks the same resolver the key handling and the mouse dispatch ask, and renders each badge from the binding that resolver matches. A chip cannot claim a key that does nothing, and a label cannot describe a click that does something else, because neither is written here. Display text is the one part that is not shared -- lib/core says what is available and what triggers it, ControlActionText.cpp says what it is called. That split is why the table can stay free of UI strings and still be the single source of the pairing. It refreshes on a timer rather than by subscribing. Two things that change a row -- a belt drag starting, the ghost crossing a transfer target -- happen on mouse movement and publish nothing, and they must still show while the game is paused, so there is no event and no tick to hang it on. Resolving is comparing two vectors of enums, and the rebuild is skipped unless they differ. Left edge, bottom-aligned in the same band the selection panel is confined to, so it clears the build bar's strip and never meets the panel on the opposite edge. Clicking the heading collapses it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHcUerKAZKWNvSKJxYKbnG
This commit is contained in:
@@ -14,6 +14,8 @@ SET(HDRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/HeaderBar.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/BuildButtonBar.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SelectionPanel.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ControlsPanel.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ControlActionText.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/BlueprintLibrary.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/BlueprintSelectionDialog.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ShipLayoutDialog.h
|
||||
@@ -45,6 +47,8 @@ SET(SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/HeaderBar.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/BuildButtonBar.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/SelectionPanel.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ControlsPanel.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ControlActionText.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/BlueprintLibrary.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/BlueprintSelectionDialog.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ShipLayoutDialog.cpp
|
||||
|
||||
Reference in New Issue
Block a user