Skip to content

SpellBookAbilityUI ​

Inherits: MarginContainer

One ability in the spellbook: its icon and name. It asks for the tooltip on hover (ability_tooltip_requested) and for a drag onto the action bar (ability_drag_requested).

Variables ​

AbilityInstancecurrent_ability
boolis_mouse_heldfalse
floatpress_start_time0.0
floatlong_press_duration0.1

Methods ​

voidsetup_spellbook_ability( ability: AbilityInstance )

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).

Variable descriptions ​

AbilityInstance current_ability ​

The ability on this slot

bool is_mouse_held = false ​

Flag to track if the mouse button is being held down

float press_start_time = 0.0 ​

Real-time tracking for long press

float long_press_duration = 0.1 ​

in seconds, matching original timer wait_time

Method descriptions ​

void setup_spellbook_ability( ability: AbilityInstance ) ​

Setup the spellbook ability