PlaceableView

Enforces fixed icon size for...

sort Weight: 10

Enforces fixed icon size for consistent icon dimensions when [member fixed_icon_size] > 0.[br] Constrains icon to a square boundary (fixed_icon_size x fixed_icon_size) while maintaining[br] aspect ratio. The larger dimension is scaled to fit fixed_icon_size, and the smaller dimension[br] scales proportionally. Icon is centered within the bounds.[br] When disabled (0), icon sizing is not enforced and will use scene file settings.

Version: v5.0.0

STABLE

Inherits: PanelContainer
Source: placeable_view.gd
Parsing: AST-based for maximum accuracy with symbol typing


Variables

_icon_rect:

Icon texture display node (child of HBox)


_label:

Label display node for placeable name (child of HBox)


_ui_interaction:

Handles click/hover interactions for this view


Signals

placeable_selected(placeable: Placeable)

[param placeable] The placeable object associated with this view.

Parameters:

  • placeable: Placeable

Methods

_ready

Signature: _ready() -> void

Initializes the view by wiring child nodes, setting up interaction, and enforcing sizing.

Returns: void


_init_interaction

Signature: _init_interaction() -> void

Initializes UI interaction handling for click and hover events.

Returns: void


_on_clicked

Signature: _on_clicked() -> void

Called when the user clicks on this view. Emits [signal placeable_selected].

Returns: void


_wire_nodes

Signature: _wire_nodes() -> void

Wires up references to child nodes (Icon TextureRect and Label).

Returns: void


_update_view

Signature: _update_view() -> void

Clears the view if placeable is null.

Returns: void


_enforce_view_height

Signature: _enforce_view_height() -> void

When disabled (0), allows the view to size naturally based on content.

Returns: void


_enforce_icon_size

Signature: _enforce_icon_size() -> void

When disabled (0), icon sizing is not enforced and will use scene file settings.

Returns: void