#pragma once #include "game/game_handler.hpp" #include #include #include #include namespace wowee { namespace pipeline { class AssetManager; } namespace ui { class TalentScreen { public: void render(game::GameHandler& gameHandler); bool isOpen() const { return open; } void toggle() { open = !open; } void setOpen(bool o) { open = o; } private: void renderTalentTrees(game::GameHandler& gameHandler); void renderTalentTree(game::GameHandler& gameHandler, uint32_t tabId, const std::string& bgFile); void renderTalent(game::GameHandler& gameHandler, const game::GameHandler::TalentEntry& talent, uint32_t pointsInTree); void loadSpellDBC(pipeline::AssetManager* assetManager); void loadSpellIconDBC(pipeline::AssetManager* assetManager); void loadGlyphPropertiesDBC(pipeline::AssetManager* assetManager); void renderGlyphs(game::GameHandler& gameHandler); VkDescriptorSet getSpellIcon(uint32_t iconId, pipeline::AssetManager* assetManager); bool open = false; bool nKeyWasDown = false; // DBC caches bool spellDbcLoaded = false; bool iconDbcLoaded = false; bool glyphDbcLoaded = false; std::unordered_map spellIconIds; // spellId -> iconId std::unordered_map spellIconPaths; // iconId -> path std::unordered_map spellIconCache; // iconId -> texture std::unordered_map spellTooltips; // spellId -> description std::unordered_map bgTextureCache_; // tabId -> bg texture // Talent learn confirmation bool talentConfirmOpen_ = false; uint32_t pendingTalentId_ = 0; uint32_t pendingTalentRank_ = 0; std::string pendingTalentName_; // GlyphProperties.dbc cache: glyphId -> { spellId, isMajor } struct GlyphInfo { uint32_t spellId = 0; bool isMajor = false; }; std::unordered_map glyphProperties_; // glyphId -> info }; } // namespace ui } // namespace wowee