A row of buttons for switching between Info, Build, Move, and Demolish. The buttons work like the mode keys: pressing one enters that mode, and pressing the active one turns placement off. The bar always shows the current mode, even when it was changed with a key. Hovering a button shows the mode's name, key, and what it does.
Source: addons/grid_placement/ui/mode/mode_switch_bar.gd
Syntax
class ModeSwitchBar extends PlacementControlMembers
| Name | Kind | Summary |
|---|---|---|
icon_info | Property | Icon for the Info button. |
icon_build | Property | Icon for the Build button. |
icon_move | Property | Icon for the Move button. |
icon_demolish | Property | Icon for the Demolish button. |
mode_button | Method | |
resolve_placement_dependencies | Method | |
resolve_placement_runtime | Method |
Guides that use this class
Tutorials built on Grid Placement
- Godot multiplayer grid placement: one host, four sessions
- Godot 2D grid building system: paint, place, save
- Godot 3D grid building system: the runtime loop
- Godot 4 grid-building plugins: build mode vs editor tools
- 3D room placement in Godot: build rooms and stack storeys
- 3D grid placement in Godot 4: full setup tutorial
- Snap to a TileMap in Godot: 2D grid placement
- How to make a farming system in Godot
- How to snap objects to a 3D grid in Godot