mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Talent screen: - Remove all debug text and per-frame LOG_INFO spam - Show class name in window title (e.g. "Warrior Talents") - Display point distribution in header (0/31/20) and per-tab counts - Highlighted active spec button with styled spec switcher - Load and render tree background textures from TalentTab.dbc - Draw prerequisite arrows with arrowheads (green=met, gray=unmet) - Fix rank display (was showing rank+1, now correct 1-indexed values) - Rank counter with dark background pill for readability - Hover glow effect, rounded corners, centered grid layout - Wider window (680x600) for 4-column WoW talent grid Spellbook: - Add search/filter bar for finding spells by name - Add spell descriptions from Spell.dbc tooltip field - Rich tooltips with name, rank, passive indicator, cooldown, description - Visual icon borders: yellow=passive, red=cooldown, default=active - Cooldown overlay on icon with countdown number - Hover highlight on spell rows - Tab counts update to reflect search filter results - Rounded corners on icons and hover states - Extracted renderSpellTooltip helper for consistent tooltip rendering
47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include "game/game_handler.hpp"
|
|
#include <imgui.h>
|
|
#include <vulkan/vulkan.h>
|
|
#include <unordered_map>
|
|
#include <string>
|
|
|
|
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);
|
|
VkDescriptorSet getSpellIcon(uint32_t iconId, pipeline::AssetManager* assetManager);
|
|
|
|
bool open = false;
|
|
bool nKeyWasDown = false;
|
|
|
|
// DBC caches
|
|
bool spellDbcLoaded = false;
|
|
bool iconDbcLoaded = false;
|
|
std::unordered_map<uint32_t, uint32_t> spellIconIds; // spellId -> iconId
|
|
std::unordered_map<uint32_t, std::string> spellIconPaths; // iconId -> path
|
|
std::unordered_map<uint32_t, VkDescriptorSet> spellIconCache; // iconId -> texture
|
|
std::unordered_map<uint32_t, std::string> spellTooltips; // spellId -> description
|
|
std::unordered_map<uint32_t, VkDescriptorSet> bgTextureCache_; // tabId -> bg texture
|
|
};
|
|
|
|
} // namespace ui
|
|
} // namespace wowee
|