mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add Whisper and Invite to Group to guild member context menu
Social actions appear at the top of the right-click menu when the member is online, matching WoW's guild roster behavior.
This commit is contained in:
parent
8eb451aab5
commit
72e07fbe3f
1 changed files with 19 additions and 1 deletions
|
|
@ -7076,8 +7076,26 @@ void GameScreen::renderGuildRoster(game::GameHandler& gameHandler) {
|
|||
|
||||
// Context menu popup
|
||||
if (ImGui::BeginPopup("GuildMemberContext")) {
|
||||
ImGui::Text("%s", selectedGuildMember_.c_str());
|
||||
ImGui::TextDisabled("%s", selectedGuildMember_.c_str());
|
||||
ImGui::Separator();
|
||||
// Social actions — only for online members
|
||||
bool memberOnline = false;
|
||||
for (const auto& mem : roster.members) {
|
||||
if (mem.name == selectedGuildMember_) { memberOnline = mem.online; break; }
|
||||
}
|
||||
if (memberOnline) {
|
||||
if (ImGui::MenuItem("Whisper")) {
|
||||
selectedChatType = 4;
|
||||
strncpy(whisperTargetBuffer, selectedGuildMember_.c_str(),
|
||||
sizeof(whisperTargetBuffer) - 1);
|
||||
whisperTargetBuffer[sizeof(whisperTargetBuffer) - 1] = '\0';
|
||||
refocusChatInput = true;
|
||||
}
|
||||
if (ImGui::MenuItem("Invite to Group")) {
|
||||
gameHandler.inviteToGroup(selectedGuildMember_);
|
||||
}
|
||||
ImGui::Separator();
|
||||
}
|
||||
if (ImGui::MenuItem("Promote")) {
|
||||
gameHandler.promoteGuildMember(selectedGuildMember_);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue