Grid Placement

PlaceableListEntry

AUTO-GENERATED (GDScript) API entry

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: ui/placeable/sequence/placeable_list_entry.gd

Version: 5.0

class_name: PlaceableListEntry extends: HBoxContainer

Signals

  • selected(entry: PlaceableListEntry)
    • Emitted after cycling to a different variant. Use variant_index to query the active object.
    • Single placeable resource to display/select when no sequence is provided.
  • variant_changed(entry: PlaceableListEntry, variant_index: int)
    • Single placeable resource to display/select when no sequence is provided.

Exports

  • placeable: Resource
    • (for example a PlaceableSequence containing multiple Placeable resources).
    • Key Features
      • Emits selected when the user clicks or presses Enter/Space.
      • Emits variant_changed when cycling variants via arrow buttons or Left/Right keys.
      • Provides public getters so documentation and examples never rely on private helpers:
      • 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: String and optional icon: Texture2D.
      • When sequence is used, it should expose count() and get_variant(index).
  • sequence: Resource

    • Purpose
      • Drop-in UI cell meant to replace a plain ItemList row with a richer control
    • that shows an icon, name, and optional variant index with left/right arrows.
    • (for example a PlaceableSequence containing multiple Placeable resources).
    • Key Features
      • Emits selected when the user clicks or presses Enter/Space.
      • Emits variant_changed when 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: String and optional icon: Texture2D.
  • icon_size: Vector2 = Vector2(48, 48):
  • _group
    • 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.
  • fixed_entry_height

Methods

  • _ready
  • _init_interaction
  • _on_clicked
  • _wire_nodes
  • set_selected(v: bool)
  • is_selected -> bool
  • _gui_input(event)
    • Handle keyboard navigation only - mouse clicks are handled by PlaceableUIInteraction
  • _cycle_variant(direction: int)
  • _active_object -> Resource
  • get_active_placeable -> Resource
  • get_active_variant_index -> int
  • get_active_display_name -> String
  • _update_variant_visibility
  • _get_property(obj: Object, name: String)
  • _update_view
  • _sequence_count -> int
  • _sequence_has_variants -> bool
  • _enforce_entry_height -> void