mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Add AFK/DND toggles to player frame menu and right-click context to pet frame
This commit is contained in:
parent
5fdcb5df81
commit
d072c852f3
1 changed files with 21 additions and 0 deletions
|
|
@ -2094,6 +2094,15 @@ void GameScreen::renderPlayerFrame(game::GameHandler& gameHandler) {
|
|||
if (ImGui::MenuItem("Toggle PvP")) {
|
||||
gameHandler.togglePvp();
|
||||
}
|
||||
ImGui::Separator();
|
||||
bool afk = gameHandler.isAfk();
|
||||
bool dnd = gameHandler.isDnd();
|
||||
if (ImGui::MenuItem(afk ? "Cancel AFK" : "Set AFK")) {
|
||||
gameHandler.toggleAfk();
|
||||
}
|
||||
if (ImGui::MenuItem(dnd ? "Cancel DND" : "Set DND")) {
|
||||
gameHandler.toggleDnd();
|
||||
}
|
||||
if (gameHandler.isInGroup()) {
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("Leave Group")) {
|
||||
|
|
@ -2295,6 +2304,18 @@ void GameScreen::renderPetFrame(game::GameHandler& gameHandler) {
|
|||
if (ImGui::Selectable(petLabel, false, 0, ImVec2(0, 0))) {
|
||||
gameHandler.setTarget(petGuid);
|
||||
}
|
||||
// Right-click context menu on pet name
|
||||
if (ImGui::BeginPopupContextItem("PetNameCtx")) {
|
||||
ImGui::TextDisabled("%s", petLabel);
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("Target Pet")) {
|
||||
gameHandler.setTarget(petGuid);
|
||||
}
|
||||
if (ImGui::MenuItem("Dismiss Pet")) {
|
||||
gameHandler.dismissPet();
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
ImGui::PopStyleColor();
|
||||
if (petLevel > 0) {
|
||||
ImGui::SameLine();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue