2026-03-31 10:07:58 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
`chore(application): extract appearance controller and unify UI flow`
- Refactor UI application architecture: extracted appearance controller into ui_services.hpp + implementation updates
- Update UI components and managers to use new service layer:
- `action_bar_panel`, `auth_screen`, `character_screen`, `chat_panel`, `combat_ui`, `dialog_manager`, `game_screen`, `settings_panel`, `social_panel`, `toast_manager`, `ui_manager`, `window_manager`
- Adjust core application entrypoints:
- application.cpp
- Update component implementations for new controller flow:
- action_bar_panel.cpp, `chat_panel.cpp`, `combat_ui.cpp`, `dialog_manager.cpp`, `game_screen.cpp`, `settings_panel.cpp`, `social_panel.cpp`, `toast_manager.cpp`, `window_manager.cpp`
These staged changes implement a major architectural refactor for UI/appearance controller separation
2026-04-01 20:59:17 +03:00
|
|
|
#include "ui/ui_services.hpp"
|
2026-03-31 10:07:58 +03:00
|
|
|
#include <imgui.h>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
namespace wowee {
|
|
|
|
|
namespace game { class GameHandler; }
|
|
|
|
|
namespace ui {
|
|
|
|
|
|
|
|
|
|
class ChatPanel;
|
|
|
|
|
class InventoryScreen;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Dialog / popup overlay manager
|
|
|
|
|
*
|
|
|
|
|
* Owns all yes/no popup rendering:
|
|
|
|
|
* group invite, duel request, duel countdown, loot roll, trade request,
|
|
|
|
|
* trade window, summon request, shared quest, item text, guild invite,
|
|
|
|
|
* ready check, BG invite, BF manager invite, LFG proposal, LFG role check,
|
|
|
|
|
* resurrect, talent wipe confirm, pet unlearn confirm.
|
|
|
|
|
*/
|
|
|
|
|
class DialogManager {
|
|
|
|
|
public:
|
|
|
|
|
DialogManager() = default;
|
|
|
|
|
|
|
|
|
|
/// Render "early" dialogs (group invite through LFG role check)
|
|
|
|
|
/// called in render() before guild roster / social frame
|
|
|
|
|
void renderDialogs(game::GameHandler& gameHandler,
|
|
|
|
|
InventoryScreen& inventoryScreen,
|
|
|
|
|
ChatPanel& chatPanel);
|
|
|
|
|
|
|
|
|
|
/// Render "late" dialogs (resurrect, talent wipe, pet unlearn)
|
|
|
|
|
/// called in render() after reclaim corpse button
|
|
|
|
|
void renderLateDialogs(game::GameHandler& gameHandler);
|
|
|
|
|
|
`chore(application): extract appearance controller and unify UI flow`
- Refactor UI application architecture: extracted appearance controller into ui_services.hpp + implementation updates
- Update UI components and managers to use new service layer:
- `action_bar_panel`, `auth_screen`, `character_screen`, `chat_panel`, `combat_ui`, `dialog_manager`, `game_screen`, `settings_panel`, `social_panel`, `toast_manager`, `ui_manager`, `window_manager`
- Adjust core application entrypoints:
- application.cpp
- Update component implementations for new controller flow:
- action_bar_panel.cpp, `chat_panel.cpp`, `combat_ui.cpp`, `dialog_manager.cpp`, `game_screen.cpp`, `settings_panel.cpp`, `social_panel.cpp`, `toast_manager.cpp`, `window_manager.cpp`
These staged changes implement a major architectural refactor for UI/appearance controller separation
2026-04-01 20:59:17 +03:00
|
|
|
// Section 3.5: UIServices injection (Phase B singleton breaking)
|
|
|
|
|
void setServices(const UIServices& services) { services_ = services; }
|
|
|
|
|
|
2026-03-31 10:07:58 +03:00
|
|
|
private:
|
`chore(application): extract appearance controller and unify UI flow`
- Refactor UI application architecture: extracted appearance controller into ui_services.hpp + implementation updates
- Update UI components and managers to use new service layer:
- `action_bar_panel`, `auth_screen`, `character_screen`, `chat_panel`, `combat_ui`, `dialog_manager`, `game_screen`, `settings_panel`, `social_panel`, `toast_manager`, `ui_manager`, `window_manager`
- Adjust core application entrypoints:
- application.cpp
- Update component implementations for new controller flow:
- action_bar_panel.cpp, `chat_panel.cpp`, `combat_ui.cpp`, `dialog_manager.cpp`, `game_screen.cpp`, `settings_panel.cpp`, `social_panel.cpp`, `toast_manager.cpp`, `window_manager.cpp`
These staged changes implement a major architectural refactor for UI/appearance controller separation
2026-04-01 20:59:17 +03:00
|
|
|
// Section 3.5: Injected UI services
|
|
|
|
|
UIServices services_;
|
2026-03-31 10:07:58 +03:00
|
|
|
// Common ImGui window flags for popup dialogs
|
|
|
|
|
static constexpr ImGuiWindowFlags kDialogFlags =
|
|
|
|
|
ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize;
|
|
|
|
|
|
|
|
|
|
// ---- LFG role state ----
|
|
|
|
|
uint8_t lfgRoles_ = 0x08; // default: DPS (0x02=tank, 0x04=healer, 0x08=dps)
|
|
|
|
|
|
|
|
|
|
// ---- Individual dialog renderers ----
|
|
|
|
|
void renderGroupInvitePopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderDuelRequestPopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderDuelCountdown(game::GameHandler& gameHandler);
|
|
|
|
|
void renderItemTextWindow(game::GameHandler& gameHandler);
|
|
|
|
|
void renderSharedQuestPopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderSummonRequestPopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderTradeRequestPopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderTradeWindow(game::GameHandler& gameHandler,
|
|
|
|
|
InventoryScreen& inventoryScreen,
|
|
|
|
|
ChatPanel& chatPanel);
|
|
|
|
|
void renderLootRollPopup(game::GameHandler& gameHandler,
|
|
|
|
|
InventoryScreen& inventoryScreen,
|
|
|
|
|
ChatPanel& chatPanel);
|
|
|
|
|
void renderGuildInvitePopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderReadyCheckPopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderBgInvitePopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderBfMgrInvitePopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderLfgProposalPopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderLfgRoleCheckPopup(game::GameHandler& gameHandler);
|
|
|
|
|
void renderResurrectDialog(game::GameHandler& gameHandler);
|
|
|
|
|
void renderTalentWipeConfirmDialog(game::GameHandler& gameHandler);
|
|
|
|
|
void renderPetUnlearnConfirmDialog(game::GameHandler& gameHandler);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace ui
|
|
|
|
|
} // namespace wowee
|