Clickable Info/Build/Move/Demolish mode-switch bar shared by every demo. One row of icon-only toggle buttons on a shared background panel, mirroring number keys 1-4: pressing a mode's button enters that mode, and pressing the active mode's button toggles back to OFF, exactly like the keys. Key-driven changes reflect back onto the buttons via [signal ModeState.mode_changed], so the bar always shows the live mode. Hovering a button names the mode, its key, and what it does. Build goes through [method GridPlacementHost.enter_place_router_for_session] (the key-2 path) when a host is bound, and sets PLACE directly otherwise. Lives in the shared demo HUD bottom-center row, so all 2D demos and the 3D demo get it.
Source: addons/grid_placement/ui/mode/mode_switch_bar.gd
Syntax
class ModeSwitchBar extends PlacementControlMembers
| Name | Kind | Summary |
|---|---|---|
icon_info | Property | |
icon_build | Property | |
icon_move | Property | |
icon_demolish | Property | |
mode_button | Method | |
resolve_placement_dependencies | Method | |
resolve_placement_runtime | Method | |
button | Property |