From 850e4e798da0f064a7b73b11b29c2e8936fd932f Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 13 Mar 2026 09:01:30 -0700 Subject: [PATCH] feat: add right-click context menu to reputation rows to set tracked faction --- src/ui/inventory_screen.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/ui/inventory_screen.cpp b/src/ui/inventory_screen.cpp index 6be4eef8..eae1efc5 100644 --- a/src/ui/inventory_screen.cpp +++ b/src/ui/inventory_screen.cpp @@ -1444,6 +1444,8 @@ void InventoryScreen::renderReputationPanel(game::GameHandler& gameHandler) { bool atWar = (repListId != 0xFFFFFFFFu) && gameHandler.isFactionAtWar(repListId); bool isWatched = (factionId == watchedFactionId); + ImGui::PushID(static_cast(factionId)); + // Faction name + tier label on same line; mark at-war and watched factions ImGui::TextColored(tier.color, "[%s]", tier.name); ImGui::SameLine(90.0f); @@ -1479,7 +1481,23 @@ void InventoryScreen::renderReputationPanel(game::GameHandler& gameHandler) { ImGui::SetNextItemWidth(-1.0f); ImGui::ProgressBar(ratio, ImVec2(0, 12.0f), overlay); ImGui::PopStyleColor(); + + // Right-click context menu on the progress bar + if (ImGui::BeginPopupContextItem("##RepCtx")) { + ImGui::TextDisabled("%s", displayName); + ImGui::Separator(); + if (isWatched) { + if (ImGui::MenuItem("Untrack")) + gameHandler.setWatchedFactionId(0); + } else { + if (ImGui::MenuItem("Track on Rep Bar")) + gameHandler.setWatchedFactionId(factionId); + } + ImGui::EndPopup(); + } + ImGui::Spacing(); + ImGui::PopID(); } ImGui::EndChild();