PlaceableListEntry
AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: ui/placeable/sequence/placeable_list_entry.gd
Version: 5.0
class_name: PlaceableListEntry
extends: HBoxContainer
Summary
Rich, keyboard- and mouse-friendly list entry for selecting a Placeable or sequence variant.
Purpose
- Drop-in UI cell meant to replace a plain
ItemListrow with a richer control that shows an icon, name, and optional variant index with left/right arrows. - Works either with a single
placeableResource or with asequenceof variants (for example aPlaceableSequencecontaining multiplePlaceableresources).
Key Features
- Emits
selectedwhen the user clicks or presses Enter/Space. - Emits
variant_changedwhen cycling variants via arrow buttons or Left/Right keys. - Provides public getters so documentation and examples never rely on private helpers:
get_active_placeable()returns the currently active resource in this entry.get_active_variant_index()returns the active variant index.get_active_display_name()resolves a display name from the active object.
Input and Accessibility
- Mouse: left click selects; on-screen left/right buttons cycle variants.
- Keyboard: when focused, Left/Right cycle variants; Enter/Space select.
Data requirements
- The active object should provide a
display_name: Stringand optionalicon: Texture2D. - When
sequenceis used, it should exposecount()andget_variant(index).
Signals
selected- Emitted when this entry is selected by the user.
variant_changed- Emitted after cycling to a different variant. Use
variant_indexto query the active object.
- Emitted after cycling to a different variant. Use
Exports
placeable- Single placeable resource to display/select when no sequence is provided.
sequence- Optional sequence wrapper providing variants (e.g.
PlaceableSequence). Should implementcount()andget_variant(index).
- Optional sequence wrapper providing variants (e.g.
icon_sizefixed_entry_height- Fixed height for list entries to maintain consistent sizing.[br][br] When set to a positive value, enforces a fixed height regardless of content.[br] When set to 0, height enforcement is disabled and the entry will size naturally.[br] Default: 56 pixels to match template standard sizing.
Methods
_ready()_init_interaction()_on_clicked()_wire_nodes()set_selected()is_selected()_gui_input()_cycle_variant()_active_object()- Internal: compute the active object given
sequenceand current index.
- Internal: compute the active object given
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.
_update_variant_visibility()_get_property()_update_view()_sequence_count()_sequence_has_variants()_enforce_entry_height()- Enforces fixed height for consistent sizing when fixed_entry_height > 0