Kelsidavis-WoWee/include/ui/quest_log_screen.hpp
Kelsi 962c640ff5 ui: add raid frames, quest log scroll-to-quest, and quest tracking polish
Raid frames:
- When groupType=1 (raid), render compact grid-style raid frames instead
  of the vertical party list that would overflow for 25/40-man groups
- Members organized by subgroup (G1-G8), up to 5 rows per subgroup column
- Each cell shows: name, health bar (green/yellow/red), power bar (class color)
- Clicking a cell targets the member; border highlight for current target
- Frames anchored above action bar area, centered horizontally

Quest log scroll-to-quest:
- openAndSelectQuest(questId) selects the quest AND scrolls the list pane
  to show it (SetScrollHereY on the first render frame after open)
- One-shot scroll: scrollToSelected_ cleared after first use so normal
  scroll behavior is unaffected afterward

Quest tracker:
- Clicking a tracked quest now calls openAndSelectQuest() — opens the log
  AND jumps to that specific quest rather than just opening to top
2026-03-10 05:26:16 -07:00

34 lines
999 B
C++

#pragma once
#include "game/game_handler.hpp"
#include <imgui.h>
#include <cstdint>
#include <unordered_set>
namespace wowee { namespace ui {
class QuestLogScreen {
public:
void render(game::GameHandler& gameHandler);
bool isOpen() const { return open; }
void toggle() { open = !open; }
void setOpen(bool o) { open = o; }
// Open the log and scroll to the given quest (by questId)
void openAndSelectQuest(uint32_t questId) {
open = true;
pendingSelectQuestId_ = questId;
scrollToSelected_ = true;
}
private:
bool open = false;
bool lKeyWasDown = false;
int selectedIndex = -1;
uint32_t pendingSelectQuestId_ = 0; // non-zero: select this quest on next render
bool scrollToSelected_ = false; // true: call SetScrollHereY once after selection
uint32_t lastDetailRequestQuestId_ = 0;
double lastDetailRequestAt_ = 0.0;
std::unordered_set<uint32_t> questDetailQueryNoResponse_;
};
}} // namespace wowee::ui