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

@ -184,6 +184,15 @@ void SpellbookScreen::loadSpellDBC(pipeline::AssetManager* assetManager) {
dbcLoaded = !spellData.empty();
}
bool SpellbookScreen::renderSpellInfoTooltip(uint32_t spellId, game::GameHandler& gameHandler,
pipeline::AssetManager* assetManager) {
if (!dbcLoadAttempted) loadSpellDBC(assetManager);
const SpellInfo* info = getSpellInfo(spellId);
if (!info) return false;
renderSpellTooltip(info, gameHandler);
return true;
}
std::string SpellbookScreen::lookupSpellName(uint32_t spellId, pipeline::AssetManager* assetManager) {
if (!dbcLoadAttempted) {
loadSpellDBC(assetManager);