PlaceableSelectionUI
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Unified UI component for selecting placeable objects and placeable sequences to build.
Source File: addons/grid_building/ui/placeable/single/placeable_selection_ui.gd
Extends: Control
Signals
Signal:
valid_changed(is_valid : bool)Emitted when the UI validation state changes.
is_validTrue if the UI is properly configured and ready for use.
Exported Properties
Property:
category_tags : Array[CategoricalTag] = []Category tags to include alongside folder-loaded ones.
These tags are combined with tags loaded from
category_tags_folder.Property:
placeables : Array[Placeable] = []Individual placeables to include alongside folder-loaded ones.
These are displayed in grids alongside sequences. Combined with placeables from
placeables_folder.Property:
sequences : Array[PlaceableSequence] = []Placeable sequences to include alongside folder-loaded ones.
Sequences allow variant cycling within a single grid slot. Combined with sequences from
sequences_folder.Property:
placeable_entry_template : PackedSceneTemplate scene for individual placeable entries.
Should be a [PlaceableView] that displays icon and name.
Property:
sequence_entry_template : PackedSceneTemplate scene for sequence entries with variant cycling.
Should be a [PlaceableListEntry] that supports cycling through sequence variants.
Property:
fixed_template_height : int = 48Fixed height for all templates to prevent resizing when cycling through sequence variants.
When set to a positive value, enforces consistent height for all template entries.
When set to 0, disables PlaceableSelectionUI-level height enforcement and allows templates to size naturally.
Note: Individual PlaceableView instances may still enforce their own height via their fixed_view_height property.
Default: 48 pixels for consistent template sizing.
Property:
fixed_icon_size : int = 40Fixed icon size for all placeable view icons to ensure consistent icon dimensions.
When set to a positive value, enforces both width and height for all icon TextureRects in PlaceableView instances.
When set to 0, icon sizing is not enforced and will use template defaults.
Default: 40 pixels for standard icon sizing.
Property:
show_category_tab_names : bool = trueWhether category tab titles should be visible for manual category selection.
When false, tabs are hidden and only grid content is shown.
Property:
hide_ui_on_selection : bool = falseWhether to hide the selection UI when an item is selected.
When true, the UI automatically hides after the user selects a placeable or sequence.
Property:
ui_root : Control- Root control node for showing and hiding the entire UI.Property:
tab_container : TabContainerTab container that handles category-based organization.
Each tab represents a category tag and contains a grid of matching placeables/sequences.
Properties
Property:
category_tags_folder : String = ""Path to folder containing category tag resources.
Tags found here are automatically loaded and added to
category_tags.Property:
placeables_folder : String = ""Path to folder containing placeable resources.
Placeables found here are automatically loaded and added to
placeables.Property:
sequences_folder : String = ""Path to folder containing placeable sequence resources.
Sequences found here are automatically loaded and added to
sequences.Property:
grid_columns : int = 1Number of columns for the grid layout.
Default: 1 (single column list layout).
Private Properties
Property:
_mode_state : [ModeState](./mode-state/) :(private)System mode state for tracking build mode changes.
Automatically connects to mode changes to show/hide the UI appropriately.
Property:
_systems_context : [GBSystemsContext](./gb-systems-context/)(private) - Context providing access to building system and other grid building systems.Property:
_logger : [GBLogger](./gb-logger/)(private) - Logger for diagnostic and error messages.Property:
_logic := PlaceableSelectionLogic.new()(private) - Shared logic for placeable selection behavior.
Public Methods
resolve_gb_dependencies
Called by GBChildInjector to resolve dependencies on the UI.
p_container: GBCompositionContainer - Container with system dependencies and configuration
rebuild
Rebuild the UI after changing content type or assets at runtime
clear
add_placeables
Adds placeable options to the UI and updates the corresponding visuals.
new_placeables: Array[Placeable] - Array of new placeable resources to add to the UI
remove_placeables
Removes placeable options from the UI and updates the corresponding visuals.
rem_placeables: Array[Placeable] - Array of placeable resources to remove from the UI
get_runtime_issues
Run setup checks on the UI to ensure proper setup. Returns validation issues found during setup checks.
return: Array[String] - List of validation issues (empty if valid)
Private Methods
_ready
Flags: private
_load_assets
Flags: private
Load assets using GBAssetResolver for both placeables and sequences
_setup_tabs
Flags: private
Generate tabs for each category and populate each tab with content in unified grid layout
_get_placeables_with_tag
Flags: private
_get_sequences_with_tag
Flags: private
_create_mixed_content_grid
Flags: private
Creates a mixed content grid containing both placeables and sequences
_on_placeable_selected
Flags: private
_on_sequence_entry_selected
Flags: private
_on_sequence_variant_changed
Flags: private
_on_mode_changed
Flags: private
_on_hidden
Flags: private
When hidden, if in build mode, automatically switch to off mode
_validate_basic_components
Flags: private
Get the current building system from systems context Validates basic required components are properly assigned
_validate_required_templates
Flags: private
Validates only the templates that are needed based on loaded content
_get_building_system
Flags: private
_enforce_template_height
Flags: private
Enforces fixed height for consistent template sizing when fixed_template_height > 0.
When fixed_template_height is 0, height enforcement is disabled at the PlaceableSelectionUI level.
_constrain_template_icons
Flags: private
Constrains icon/image elements within templates to prevent height expansion
_find_nodes_by_type
Flags: private
Recursively finds all nodes of a specific type within a parent node