mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 08:30:13 +00:00
Add right-click context menu to quest log list entries
This commit is contained in:
parent
109b0a984a
commit
716c0c0e4c
1 changed files with 21 additions and 0 deletions
|
|
@ -352,6 +352,27 @@ void QuestLogScreen::render(game::GameHandler& gameHandler, InventoryScreen& inv
|
|||
questDetailQueryNoResponse_.erase(q.questId);
|
||||
}
|
||||
}
|
||||
|
||||
// Right-click context menu on quest row
|
||||
if (ImGui::BeginPopupContextItem("QuestRowCtx")) {
|
||||
selectedIndex = static_cast<int>(i); // select on right-click too
|
||||
ImGui::TextDisabled("%s", displayTitle.c_str());
|
||||
ImGui::Separator();
|
||||
bool tracked = gameHandler.isQuestTracked(q.questId);
|
||||
if (ImGui::MenuItem(tracked ? "Untrack" : "Track")) {
|
||||
gameHandler.setQuestTracked(q.questId, !tracked);
|
||||
}
|
||||
if (!q.complete) {
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("Abandon Quest")) {
|
||||
gameHandler.abandonQuest(q.questId);
|
||||
gameHandler.setQuestTracked(q.questId, false);
|
||||
selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
ImGui::PopID();
|
||||
}
|
||||
if (visibleQuestCount == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue