Skip to content

AbilityPanelUI ​

Inherits: Control

Paginated Ability Panel - Displays abilities in a 3x5 grid with page navigation Shows active abilities first, then passive abilities Follows the new architecture pattern: setup once, signals handle updates No stored player references - gets initial data then relies on signals

Properties ​

PackedScenespell_book_ability_scene

Variables ​

Array[AbilityInstance]all_abilities[]
Array[AbilityInstance]active_abilities[]
Array[AbilityInstance]passive_abilities[]
intcurrent_page0
inttotal_pages0
Array[Control]ability_slot_uis[]

Methods ​

voidinitialize_display( system_hub: GameHost.SystemHub )
voidclear_ability_display()
voidgoto_page( page_index: int )
voidnext_page()
voidprevious_page()

Signals ​

ability_tooltip_requested( ability: AbilityInstance ) ​

========== SIGNALS ==========

hide_tooltip( force_hide: bool ) ​

Asks the interface to hide the tooltip (force hides it at once).

ability_drag_requested( ability: AbilityInstance ) ​

Asks the interface to start dragging an ability (onto the action bar).

Constants ​

  • int ABILITIES_PER_ROW = 3 - Grid Configuration
  • int ABILITIES_PER_COLUMN = 6 - How many abilities a column of the page holds.
  • int ABILITIES_PER_PAGE = ABILITIES_PER_ROW * ABILITIES_PER_COLUMN - 15

Property descriptions ​

PackedScene spell_book_ability_scene ​

The scene of one ability.

Variable descriptions ​

Array[AbilityInstance] all_abilities = [] ​

Ability data and pagination

Array[AbilityInstance] active_abilities = [] ​

The active abilities shown.

Array[AbilityInstance] passive_abilities = [] ​

The passive abilities shown.

int current_page = 0 ​

The page shown now.

int total_pages = 0 ​

How many pages there are.

Array[Control] ability_slot_uis = [] ​

Ability UI components

Method descriptions ​

void initialize_display( system_hub: GameHost.SystemHub ) ​

Initialize the ability panel with current player data

void clear_ability_display() ​

Clear the entire ability display

void goto_page( page_index: int ) ​

Navigate to a specific page

void next_page() ​

Go to the next page

void previous_page() ​

Go to the previous page