Skip to content

PlaceableSelectionUI

UI component for selecting placeable objects to build.

Displays categorized placeables in a grid layout with tab-based filtering. Integrates with the building system to initiate placement mode when items are selected.

signal valid_changed( is_valid: bool )

Emitted when the UI validation state changes.

placeable_grid_template: PackedScene

System mode state for tracking build mode changes.

category_tags: Array[CategoricalTag]

Placeables will be filtered into individual tag categories for placement Expects display_name and texture properties

placeables: Array[Placeable] = []

Individual placeable files you may want to include that are located outside of the placeables folder or use this if you prefer to set direct references

show_category_tab_names: bool = true

Whether the category titles should show or not for clicking categories

hide_ui_on_selection: bool = false

Hide the selection ui when a item is chosen

ui_root: Control

Target for showing and hiding in the UI

tab_container: TabContainer

Handles category selection for the menu

_ready( )
resolve_gb_dependencies( p_container: GBCompositionContainer ) -> void

Called by GBChildInjector to resolve dependencies on the UI.

p_container: GBCompositionContainer - Container with system dependencies and configuration

clear( )
add_placeables( new_placeables: Array[Placeable] )

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( rem_placeables: Array[Placeable] )

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( ) -> Array[String]

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)

addons/grid_building/ui/placeable_selection_ui.gd


This page was auto-generated from GDScript source. Edit the source file to improve documentation.

Generated on 2025-09-07