UISelectable

类位于 Infernux.ui

继承自: InxUIScreenComponent

描述

可选择的 UI 元素基类。UIButton 的老爸。

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). (只读)

properties

公共方法

方法 描述
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

生命周期方法

方法 描述
awake() → None

lifecycle_methods

示例

example

# TODO: Add example for UISelectable

另请参阅

see_also