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
This commit is contained in:
Kelsi 2026-03-10 05:26:16 -07:00
parent fb80b125bd
commit 962c640ff5
3 changed files with 171 additions and 1 deletions

View file

@ -261,6 +261,18 @@ void QuestLogScreen::render(game::GameHandler& gameHandler) {
ImGui::BeginChild("QuestListPane", ImVec2(paneW, 0), true);
ImGui::TextColored(ImVec4(0.85f, 0.82f, 0.74f, 1.0f), "Quest List");
ImGui::Separator();
// Resolve pending select from tracker click
if (pendingSelectQuestId_ != 0) {
for (size_t i = 0; i < quests.size(); i++) {
if (quests[i].questId == pendingSelectQuestId_) {
selectedIndex = static_cast<int>(i);
break;
}
}
pendingSelectQuestId_ = 0;
}
for (size_t i = 0; i < quests.size(); i++) {
const auto& q = quests[i];
ImGui::PushID(static_cast<int>(i));
@ -274,6 +286,11 @@ void QuestLogScreen::render(game::GameHandler& gameHandler) {
if (rowW < 1.0f) rowW = 1.0f;
bool clicked = ImGui::InvisibleButton("questRowBtn", ImVec2(rowW, rowH));
bool hovered = ImGui::IsItemHovered();
// Scroll to selected quest on the first frame after openAndSelectQuest()
if (selected && scrollToSelected_) {
ImGui::SetScrollHereY(0.5f);
scrollToSelected_ = false;
}
ImVec2 rowMin = ImGui::GetItemRectMin();
ImVec2 rowMax = ImGui::GetItemRectMax();