Skip to content

ActionBarUI ​

Inherits: HUDUIElement < Control

This class manages the action bar UI, including ability/items slots, resource bars, buff/debuff displays, and cast bar functionality. Uses the modular CastBar class for casting display.

Properties ​

boolshow_health_bartrue
boolshow_resource_bartrue
boolshow_buffstrue
boolshow_debuffstrue
intmax_buff_icons8
intmax_debuff_icons8
SettingsConfig.HealthDisplayOptionhealth_text_modeSettingsConfig.HealthDisplayOption.CURRENT_MAX
SettingsConfig.HealthDisplayOptionresource_text_modeSettingsConfig.HealthDisplayOption.CURRENT_MAX
PackedSceneaction_button_scene
PackedSceneaura_icon_scene
boolallow_rearrangingtrue

Variables ​

Array[ActionBarButton]action_bar_slots
Playercurrent_actionbar_user
intaction_bar_rows_visible1:
PoolInstancecurrent_health_pool
PoolInstancecurrent_resource_pool
Array[Aura]active_buff_auras[]
Array[Aura]active_debuff_auras[]

Methods ​

voidinitialize_ui( p_system_hub: GameHost.SystemHub )

Signals ​

ability_drag_requested( ability: AbilityInstance ) ​

========== DRAG SIGNALS ==========

item_drag_requested( item: ItemInstance ) ​

Asks the interface to start dragging an item out of a slot of the bar.

Property descriptions ​

bool show_health_bar = true ​

Whether to display the health bar

bool show_resource_bar = true ​

Whether to display the resource bar

bool show_buffs = true ​

Whether to display buff icons

bool show_debuffs = true ​

Whether to display debuff icons

int max_buff_icons = 8 ​

Maximum number of buff icons to display

int max_debuff_icons = 8 ​

Maximum number of debuff icons to display

SettingsConfig.HealthDisplayOption health_text_mode = SettingsConfig.HealthDisplayOption.CURRENT_MAX ​

Text display mode for health bar

SettingsConfig.HealthDisplayOption resource_text_mode = SettingsConfig.HealthDisplayOption.CURRENT_MAX ​

Text display mode for resource bar

PackedScene action_button_scene ​

Action Buttons Scene

PackedScene aura_icon_scene ​

Aura Icons Scene

bool allow_rearranging = true ​

The player can drag abilities and items on and off the slots of this bar. Off: this bar only shows (a bar for a game where the slots are filled by the class, the effects and the events). It can only make things stricter: a slot that the project or the plan of the class locks stays locked whatever this says

Variable descriptions ​

Array[ActionBarButton] action_bar_slots ​

Array of action bar ability slot buttons

Player current_actionbar_user ​

The player entity that owns this action bar

int action_bar_rows_visible = 1: ​

Number of action bar rows currently visible (1-3)

PoolInstance current_health_pool ​

Currently displayed health pool instance

PoolInstance current_resource_pool ​

Currently displayed resource pool instance

Array[Aura] active_buff_auras = [] ​

Array of active buff aura UI elements

Array[Aura] active_debuff_auras = [] ​

Array of active debuff aura UI elements

Method descriptions ​

void initialize_ui( p_system_hub: GameHost.SystemHub ) ​

Sets the part up with the hub of the game systems: connects the signals it listens to and fills it.