mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Add ready check popup UI and fix party leader lookup
- Implement renderReadyCheckPopup() showing initiator name with Ready/Not Ready buttons - Fix MSG_RAID_READY_CHECK fallback: use partyData.leaderGuid instead of non-existent isLeader field - Add faction standing handler with loadFactionNameCache() (Faction.dbc field 22) - Add gossip POI handler writing canonical WoW coords to gossipPois_ for minimap rendering
This commit is contained in:
parent
f89840a6aa
commit
26eefe9529
4 changed files with 158 additions and 4 deletions
|
|
@ -404,6 +404,7 @@ void GameScreen::render(game::GameHandler& gameHandler) {
|
|||
renderSharedQuestPopup(gameHandler);
|
||||
renderItemTextWindow(gameHandler);
|
||||
renderGuildInvitePopup(gameHandler);
|
||||
renderReadyCheckPopup(gameHandler);
|
||||
renderGuildRoster(gameHandler);
|
||||
renderBuffBar(gameHandler);
|
||||
renderLootWindow(gameHandler);
|
||||
|
|
@ -4650,6 +4651,38 @@ void GameScreen::renderGuildInvitePopup(game::GameHandler& gameHandler) {
|
|||
ImGui::End();
|
||||
}
|
||||
|
||||
void GameScreen::renderReadyCheckPopup(game::GameHandler& gameHandler) {
|
||||
if (!gameHandler.hasPendingReadyCheck()) return;
|
||||
|
||||
auto* window = core::Application::getInstance().getWindow();
|
||||
float screenW = window ? static_cast<float>(window->getWidth()) : 1280.0f;
|
||||
float screenH = window ? static_cast<float>(window->getHeight()) : 720.0f;
|
||||
|
||||
ImGui::SetNextWindowPos(ImVec2(screenW / 2 - 175, screenH / 2 - 60), ImGuiCond_Always);
|
||||
ImGui::SetNextWindowSize(ImVec2(350, 0), ImGuiCond_Always);
|
||||
|
||||
if (ImGui::Begin("Ready Check", nullptr, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize)) {
|
||||
const std::string& initiator = gameHandler.getReadyCheckInitiator();
|
||||
if (initiator.empty()) {
|
||||
ImGui::Text("A ready check has been initiated!");
|
||||
} else {
|
||||
ImGui::TextWrapped("%s has initiated a ready check!", initiator.c_str());
|
||||
}
|
||||
ImGui::Spacing();
|
||||
|
||||
if (ImGui::Button("Ready", ImVec2(155, 30))) {
|
||||
gameHandler.respondToReadyCheck(true);
|
||||
gameHandler.dismissReadyCheck();
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Not Ready", ImVec2(155, 30))) {
|
||||
gameHandler.respondToReadyCheck(false);
|
||||
gameHandler.dismissReadyCheck();
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
void GameScreen::renderGuildRoster(game::GameHandler& gameHandler) {
|
||||
// O key toggle (WoW default Social/Guild keybind)
|
||||
if (!ImGui::GetIO().WantCaptureKeyboard && ImGui::IsKeyPressed(ImGuiKey_O)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue