Skip to content

Class

ModeSwitchBar

Generated GDScript class reference for GridPlacement.ModeSwitchBar.

Status
Current
Version
v6.1.0
Source updated
2026-09-24
Generated on
2026-09-23

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 PlacementControl

Members

NameKindSummary
icon_infoProperty
icon_buildProperty
icon_moveProperty
icon_demolishProperty
mode_buttonMethod
resolve_placement_dependenciesMethod
resolve_placement_runtimeMethod
buttonProperty