feat: show rich spell tooltip on action bar hover

Expose SpellbookScreen::renderSpellInfoTooltip() as a public method,
then use it in the action bar slot tooltip. Action bar spell tooltips
now show the same full tooltip as the spellbook: spell school (colored),
mana/rage/energy cost, cast time, range, cooldown, and description.

Falls back to a plain spell name if DBC data is not yet loaded.
Hearthstone location note is appended after the rich body.
Cooldown text moved inside each branch for consistent styling.
This commit is contained in:
Kelsi 2026-03-10 19:31:46 -07:00
parent 7bbf2c7769
commit caf0d18393
3 changed files with 41 additions and 12 deletions

View file

@ -44,6 +44,11 @@ public:
// Spell name lookup — triggers DBC load if needed, used by action bar tooltips
std::string lookupSpellName(uint32_t spellId, pipeline::AssetManager* assetManager);
// Rich tooltip — renders a full spell tooltip (inside an already-open BeginTooltip block).
// Triggers DBC load if needed. Returns true if spell data was found.
bool renderSpellInfoTooltip(uint32_t spellId, game::GameHandler& gameHandler,
pipeline::AssetManager* assetManager);
// Drag-and-drop state for action bar assignment
bool isDraggingSpell() const { return draggingSpell_; }
uint32_t getDragSpellId() const { return dragSpellId_; }