PlaceableListEntry
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Rich, keyboard- and mouse-friendly list entry for selecting a Placeable or sequence variant.
Source File: addons/grid_building/ui/placeable/sequence/placeable_list_entry.gd
Extends: HBoxContainer
Signals
- Signal:
selected(entry: PlaceableListEntry)- Emitted when this entry is selected by the user. - Signal:
variant_changed(entry: PlaceableListEntry, variant_index: int)- Emitted after cycling to a different variant. Usevariant_indexto query the active object.
Exported Properties
Property:
placeable: Resource:- Single placeable resource to display/select when no sequence is provided.Property:
sequence: Resource:Optional sequence wrapper providing variants (e.g.
PlaceableSequence). Should implementcount()andget_variant(index).Property:
icon_size: Vector2 = Vector2(48, 48):Property:
fixed_entry_height : int = 56Fixed height for list entries to maintain consistent sizing.
When set to a positive value, enforces a fixed height regardless of content.
When set to 0, height enforcement is disabled and the entry will size naturally.
Default: 56 pixels to match template standard sizing.
Private Properties
- Property:
_current_variant_index: int = 0(private) - Property:
_icon_rect: TextureRect(private) - Property:
_name_label: Label(private) - Property:
_variant_label: Label(private) - Property:
_left_button: Button(private) - Property:
_right_button: Button(private) - Property:
_container: HBoxContainer(private) - Property:
_main_panel: PanelContainer(private) - Property:
_selected: bool = false(private) - Property:
_ui_interaction: [PlaceableUIInteraction](./placeable-ui-interaction/)(private)
Public Methods
set_selected
is_selected
get_active_placeable
Returns the currently active placeable resource for this entry.
get_active_variant_index
Returns the active variant index (0-based) within the sequence.
get_active_display_name
Returns a display name for the active variant.
Private Methods
_ready
Flags: private
_init_interaction
Flags: private
_on_clicked
Flags: private
_wire_nodes
Flags: private
_gui_input
Flags: private
_cycle_variant
Flags: private
_active_object
Flags: private
Internal: compute the active object given sequence and current index.
_update_variant_visibility
Flags: private
_get_property
Flags: private
_update_view
Flags: private
_sequence_count
Flags: private
_sequence_has_variants
Flags: private
_enforce_entry_height
Flags: private
Enforces fixed height for consistent sizing when fixed_entry_height > 0