PlaceableSequenceSelectionUI
Summary
Section titled “Summary”Selection UI built around PlaceableSequence and PlaceableList entries.
This control renders a tabbed selector where each tab represents a category (from category_tags
), and within each tab a PlaceableList
shows entries for the sequences that match that category. Each list entry can cycle its own variants (via PlaceableListEntry
) and emits selection when activated.
Typical flow 1) Provide category_tags
and a set of sequences
(each with variants). 2) Call resolve_gb_dependencies()
to connect to systems and building. 3) The control will build tabs and lists; when the user selects an entry, it calls BuildingSystem.enter_build_mode()
with the active variant.
Keyboard and mouse - Mouse: click entries, use left/right buttons on entries to change variants. - Keyboard: focus an entry to use Left/Right to cycle, Enter/Space to select.
Notes - Set hide_ui_on_selection = true
to automatically hide the UI after a selection is made and the building system is entered.
Properties
Section titled “Properties”Which categories to create tabs for; a sequence appears in a tab if any of its variants has a tag found in this array.
sequences: Array[PlaceableSequence] = []
The available sequences to display across all tabs.
show_category_tab_names: bool = true
Whether to render the tab titles (useful when relying solely on icons).
hide_ui_on_selection: bool = false
If true, the entire UI hides after a selection is made.
ui_root: Control
Root control used when toggling visibility (e.g., auto-hiding on select).
tab_container: TabContainer
Tab container that hosts the per-category lists.
placeable_list_scene: PackedScene # expects PlaceableList
Packed scene for the per-tab list. Should be a
PlaceableList
scene.
Methods
Section titled “Methods”func _ready( )
func rebuild( )
Rebuild tabs after modifying
category_tags
orsequences
at runtime.func resolve_gb_dependencies( p_container: GBCompositionContainer ) -> bool
Wire up dependencies from the composition container (mode state, systems context, and building system used when entering build mode on selection).
func clear( )
func _setup_tabs( )
func _get_sequences_with_tag( tag: Resource ) -> Array[PlaceableSequence]
Filter helper: returns all sequences that have at least one variant tagged with
tag
.func _create_placeable_list( tagged_sequences: Array[PlaceableSequence] ) -> Control
Instantiate the list scene and populate it with the provided sequences. The list is expected to emit
selection_changed(entry)
.func _on_entry_selected( entry: PlaceableListEntry )
Handle selection by entering build mode with the entry’s active variant.
func get_runtime_issues( ) -> Array[String]
Returns a list of runtime configuration issues detected by this UI control. Useful for diagnostics when sequences or categories are misconfigured.
func _on_mode_changed( p_mode: GBEnums.Mode )
Source
Section titled “Source”addons/grid_building/ui/placeable/sequence/placeable_sequence_selection_ui.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.