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. Use variant_index to 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 implement count() and get_variant(index).

  • Property: icon_size: Vector2 = Vector2(48, 48):

  • Property: fixed_entry_height : int = 56

    Fixed 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

1
set_selected(v: bool)

is_selected

1
is_selected() -> bool

get_active_placeable

1
get_active_placeable() -> Resource

Returns the currently active placeable resource for this entry.


get_active_variant_index

1
get_active_variant_index() -> int

Returns the active variant index (0-based) within the sequence.


get_active_display_name

1
get_active_display_name() -> String

Returns a display name for the active variant.


Private Methods

_ready

1
_ready()

Flags: private


_init_interaction

1
_init_interaction()

Flags: private


_on_clicked

1
_on_clicked()

Flags: private


_wire_nodes

1
_wire_nodes()

Flags: private


_gui_input

1
_gui_input(event)

Flags: private


_cycle_variant

1
_cycle_variant(direction: int)

Flags: private


_active_object

1
_active_object() -> Resource

Flags: private

Internal: compute the active object given sequence and current index.


_update_variant_visibility

1
_update_variant_visibility()

Flags: private


_get_property

1
2
3
4
_get_property(
    obj: Object,
    name: String
)

Flags: private


_update_view

1
_update_view()

Flags: private


_sequence_count

1
_sequence_count() -> int

Flags: private


_sequence_has_variants

1
_sequence_has_variants() -> bool

Flags: private


_enforce_entry_height

1
_enforce_entry_height() -> void

Flags: private

Enforces fixed height for consistent sizing when fixed_entry_height > 0