mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Add right-click context menu to quest objective tracker
Right-clicking a quest title in the HUD tracker shows options to open it in the Quest Log or toggle tracking (track/stop tracking).
This commit is contained in:
parent
54750d4656
commit
9b8bc2e977
1 changed files with 23 additions and 3 deletions
|
|
@ -5410,13 +5410,33 @@ void GameScreen::renderQuestObjectiveTracker(game::GameHandler& gameHandler) {
|
|||
: ImVec4(1.0f, 1.0f, 0.85f, 1.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, titleCol);
|
||||
if (ImGui::Selectable(q.title.c_str(), false,
|
||||
ImGuiSelectableFlags_None, ImVec2(TRACKER_W - 12.0f, 0))) {
|
||||
ImGuiSelectableFlags_DontClosePopups, ImVec2(TRACKER_W - 12.0f, 0))) {
|
||||
questLogScreen.openAndSelectQuest(q.questId);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Click to open Quest Log");
|
||||
if (ImGui::IsItemHovered() && !ImGui::IsPopupOpen("##QTCtx")) {
|
||||
ImGui::SetTooltip("Click: open Quest Log | Right-click: tracking options");
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
// Right-click context menu for quest tracker entry
|
||||
if (ImGui::BeginPopupContextItem("##QTCtx")) {
|
||||
ImGui::TextDisabled("%s", q.title.c_str());
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("Open in Quest Log")) {
|
||||
questLogScreen.openAndSelectQuest(q.questId);
|
||||
}
|
||||
bool tracked = gameHandler.isQuestTracked(q.questId);
|
||||
if (tracked) {
|
||||
if (ImGui::MenuItem("Stop Tracking")) {
|
||||
gameHandler.setQuestTracked(q.questId, false);
|
||||
}
|
||||
} else {
|
||||
if (ImGui::MenuItem("Track")) {
|
||||
gameHandler.setQuestTracked(q.questId, true);
|
||||
}
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
ImGui::PopID();
|
||||
|
||||
// Objectives line (condensed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue