PlaceableSelectionUI
Recursively finds all nodes of a specific type within a parent node
Recursively finds all nodes of a specific type within a parent node
Version: v5.0.0
Inherits: Control
Source: placeable_selection_ui.gd
Parsing: AST-based for maximum accuracy with symbol typing
Variables
_mode_state: ModeState
Automatically connects to mode changes to show/hide the UI appropriately.
Type: ModeState
_systems_context: GBSystemsContext
Context providing access to building system and other grid building systems.
Type: GBSystemsContext
_logic
Shared logic for placeable selection behavior.
Signals
valid_changed(is_valid : bool: Variant)
[param is_valid] True if the UI is properly configured and ready for use.
Parameters:
is_valid : bool: Variant
Methods
_ready
Signature: _ready() -> void
Returns: void
resolve_gb_dependencies
Signature: resolve_gb_dependencies(p_container : GBCompositionContainer: Variant) -> void
p_container: GBCompositionContainer - Container with system dependencies and configuration
Returns: void
Parameters:
p_container : GBCompositionContainer: Variant
_load_assets
Signature: _load_assets() -> void
Load assets using GBAssetResolver for both placeables and sequences
Returns: void
rebuild
Signature: rebuild() -> void
Rebuild the UI after changing content type or assets at runtime
Returns: void
clear
Signature: clear() -> void
Clear existing tabs
Returns: void
_setup_tabs
Signature: _setup_tabs() -> void
Generate tabs for each category and populate each tab with content in unified grid layout
Returns: void
_get_placeables_with_tag
Signature: _get_placeables_with_tag(tag : Resource: Variant) -> Array
Returns all placeables that have the matching tag resource
Returns: Array
Parameters:
tag : Resource: Variant
_get_sequences_with_tag
Signature: _get_sequences_with_tag(tag : Resource: Variant) -> Array
Returns all sequences that have the matching tag resource
Returns: Array
Parameters:
tag : Resource: Variant
_create_mixed_content_grid
Signature: _create_mixed_content_grid(placeables_for_tag : Array[Placeable]: Variant, sequences_for_tag : Array[PlaceableSequence]: Variant) -> GridContainer
Creates a mixed content grid containing both placeables and sequences
Returns: GridContainer
Parameters:
placeables_for_tag : Array[Placeable]: Variantsequences_for_tag : Array[PlaceableSequence]: Variant
_on_placeable_selected
Signature: _on_placeable_selected(p_placeable : Placeable: Variant) -> void
Enforce fixed height to prevent cycling resize
Returns: void
Parameters:
p_placeable : Placeable: Variant
_on_sequence_entry_selected
Signature: _on_sequence_entry_selected(entry : PlaceableListEntry: Variant) -> void
Returns: void
Parameters:
entry : PlaceableListEntry: Variant
_on_sequence_variant_changed
Signature: _on_sequence_variant_changed(entry : PlaceableListEntry: Variant, variant_index : int: Variant) -> void
Returns: void
Parameters:
entry : PlaceableListEntry: Variantvariant_index : int: Variant
add_placeables
Signature: add_placeables(new_placeables : Array[Placeable]: Variant) -> void
new_placeables: Array[Placeable] - Array of new placeable resources to add to the UI
Returns: void
Parameters:
new_placeables : Array[Placeable]: Variant
remove_placeables
Signature: remove_placeables(rem_placeables : Array[Placeable]: Variant) -> void
rem_placeables: Array[Placeable] - Array of placeable resources to remove from the UI
Returns: void
Parameters:
rem_placeables : Array[Placeable]: Variant
get_runtime_issues
Signature: get_runtime_issues() -> Array
return: Array[String] - List of validation issues (empty if valid)
Returns: Array
_on_mode_changed
Signature: _on_mode_changed(p_mode : GBEnums.Mode: Variant) -> void
Make sure each placeable has a tag in the category tags
Returns: void
Parameters:
p_mode : GBEnums.Mode: Variant
_on_hidden
Signature: _on_hidden() -> void
When hidden, if in build mode, automatically switch to off mode
Returns: void
_validate_basic_components
Signature: _validate_basic_components() -> void
Validates basic required components are properly assigned
Returns: void
_validate_required_templates
Signature: _validate_required_templates() -> void
Validates only the templates that are needed based on loaded content
Returns: void
_get_building_system
Signature: _get_building_system() -> BuildingSystem
Only validate sequence template if we have sequences
Returns: BuildingSystem
_enforce_template_height
Signature: _enforce_template_height(template_entry: Control) -> void
When fixed_template_height is 0, height enforcement is disabled at the PlaceableSelectionUI level.
Returns: void
Parameters:
template_entry: Control
_constrain_template_icons
Signature: _constrain_template_icons(template_entry: Control) -> void
Constrains icon/image elements within templates to prevent height expansion
Returns: void
Parameters:
template_entry: Control
_find_nodes_by_type
Signature: _find_nodes_by_type(parent: Node, type_name: String) -> Array
Recursively finds all nodes of a specific type within a parent node
Returns: Array
Parameters:
parent: Nodetype_name: String