UISelectable

class in Infernux.ui

Inherits from: InxUIScreenComponent

Description

Base class for interactive UI elements with visual state feedback.

Provides Normal / Highlighted / Pressed / Disabled visual states with ColorTint transitions. UIButton inherits this and adds an on_click event.

Attributes: interactable: Whether the user can interact with this element. transition: How visual states are displayed. normal_color: RGBA tint when idle. highlighted_color: RGBA tint when hovered. pressed_color: RGBA tint when pressed. disabled_color: RGBA tint when disabled.

description

Properties

Name Type Description
interactable bool
transition UITransitionType
normal_color list
highlighted_color list
pressed_color list
disabled_color list
current_selection_state int The current visual state index (see SelectionState). (read-only)

properties

Public Methods

Method Description
get_current_tint() → List[float] Return the [R, G, B, A] tint for the current visual state.
on_pointer_enter(event_data: PointerEventData) → None
on_pointer_exit(event_data: PointerEventData) → None
on_pointer_down(event_data: PointerEventData) → None
on_pointer_up(event_data: PointerEventData) → None

public_methods

Lifecycle Methods

Method Description
awake() → None

lifecycle_methods

Example

example

# TODO: Add example for UISelectable

See Also

see_also