mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
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:
parent
bc18fb7c3e
commit
5fbeb7938c
1 changed files with 26 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue