mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-04 04:03:52 +00:00
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
This commit is contained in:
parent
d43397163e
commit
1c0e9dd1df
23 changed files with 315 additions and 134 deletions
|
|
@ -172,7 +172,7 @@ void ActionBarPanel::renderActionBar(game::GameHandler& gameHandler,
|
|||
ImVec2 displaySize = ImGui::GetIO().DisplaySize;
|
||||
float screenW = displaySize.x > 0.0f ? displaySize.x : 1280.0f;
|
||||
float screenH = displaySize.y > 0.0f ? displaySize.y : 720.0f;
|
||||
auto* assetMgr = core::Application::getInstance().getAssetManager();
|
||||
auto* assetMgr = services_.assetManager;
|
||||
|
||||
float slotSize = 48.0f * settingsPanel.pendingActionBarScale;
|
||||
float spacing = 4.0f;
|
||||
|
|
@ -1107,7 +1107,7 @@ void ActionBarPanel::renderStanceBar(game::GameHandler& gameHandler,
|
|||
ImVec2 displaySize = ImGui::GetIO().DisplaySize;
|
||||
float screenW = displaySize.x > 0.0f ? displaySize.x : 1280.0f;
|
||||
float screenH = displaySize.y > 0.0f ? displaySize.y : 720.0f;
|
||||
auto* assetMgr = core::Application::getInstance().getAssetManager();
|
||||
auto* assetMgr = services_.assetManager;
|
||||
|
||||
// Match the action bar slot size so they align neatly
|
||||
float slotSize = 38.0f;
|
||||
|
|
@ -1196,7 +1196,7 @@ void ActionBarPanel::renderBagBar(game::GameHandler& gameHandler,
|
|||
ImVec2 displaySize = ImGui::GetIO().DisplaySize;
|
||||
float screenW = displaySize.x > 0.0f ? displaySize.x : 1280.0f;
|
||||
float screenH = displaySize.y > 0.0f ? displaySize.y : 720.0f;
|
||||
auto* assetMgr = core::Application::getInstance().getAssetManager();
|
||||
auto* assetMgr = services_.assetManager;
|
||||
|
||||
float slotSize = 42.0f;
|
||||
float spacing = 4.0f;
|
||||
|
|
@ -1232,7 +1232,7 @@ void ActionBarPanel::renderBagBar(game::GameHandler& gameHandler,
|
|||
if (!blpData.empty()) {
|
||||
auto image = pipeline::BLPLoader::load(blpData);
|
||||
if (image.isValid()) {
|
||||
auto* w = core::Application::getInstance().getWindow();
|
||||
auto* w = services_.window;
|
||||
auto* vkCtx = w ? w->getVkContext() : nullptr;
|
||||
if (vkCtx)
|
||||
backpackIconTexture_ = vkCtx->uploadImGuiTexture(image.data.data(), image.width, image.height);
|
||||
|
|
@ -1483,7 +1483,7 @@ void ActionBarPanel::renderXpBar(game::GameHandler& gameHandler,
|
|||
ImVec2 displaySize = ImGui::GetIO().DisplaySize;
|
||||
float screenW = displaySize.x > 0.0f ? displaySize.x : 1280.0f;
|
||||
float screenH = displaySize.y > 0.0f ? displaySize.y : 720.0f;
|
||||
auto* window = core::Application::getInstance().getWindow();
|
||||
auto* window = services_.window;
|
||||
(void)window; // Not used for positioning; kept for AssetManager if needed
|
||||
|
||||
// Position just above both action bars (bar1 at screenH-barH, bar2 above that)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue