feat: right-click context menu for party member frames

Right-clicking a party member name in the 5-man party frame opens
a context menu with: Target, Set Focus, Whisper, Trade, Inspect.
- Whisper switches chat type to WHISPER and pre-fills the target name
- Trade calls GameHandler::initiateTrade(guid)
- Inspect sets target then calls GameHandler::inspectTarget()
- Uses BeginPopupContextItem tied to the Selectable widget
This commit is contained in:
Kelsi 2026-03-10 21:27:26 -07:00
parent bc18fb7c3e
commit 5fbeb7938c

View file

@ -5648,6 +5648,32 @@ void GameScreen::renderPartyFrames(game::GameHandler& gameHandler) {
ImGui::PopStyleColor();
}
// Right-click context menu for party member actions
if (ImGui::BeginPopupContextItem("PartyMemberCtx")) {
ImGui::TextDisabled("%s", member.name.c_str());
ImGui::Separator();
if (ImGui::MenuItem("Target")) {
gameHandler.setTarget(member.guid);
}
if (ImGui::MenuItem("Set Focus")) {
gameHandler.setFocus(member.guid);
}
if (ImGui::MenuItem("Whisper")) {
selectedChatType = 4; // WHISPER
strncpy(whisperTargetBuffer, member.name.c_str(), sizeof(whisperTargetBuffer) - 1);
whisperTargetBuffer[sizeof(whisperTargetBuffer) - 1] = '\0';
refocusChatInput = true;
}
if (ImGui::MenuItem("Trade")) {
gameHandler.initiateTrade(member.guid);
}
if (ImGui::MenuItem("Inspect")) {
gameHandler.setTarget(member.guid);
gameHandler.inspectTarget();
}
ImGui::EndPopup();
}
ImGui::Separator();
ImGui::PopID();
}