mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-05 20:53:52 +00:00
chore(game-screen): extract toast manager from game screen
- refactor: move toast UI logic into new `ToastManager` component - add toast_manager.hpp + toast_manager.cpp - update game_screen.hpp + game_screen.cpp to use `ToastManager` - adjust app initialization in application.cpp - keep root CMake target in CMakeLists.txt updated
This commit is contained in:
parent
0f1cd5fe9a
commit
9764286cae
6 changed files with 1462 additions and 1367 deletions
|
|
@ -2928,7 +2928,7 @@ void Application::setupUICallbacks() {
|
|||
// Level-up callback — play sound, cheer emote, and trigger UI ding overlay + 3D effect
|
||||
gameHandler->setLevelUpCallback([this](uint32_t newLevel) {
|
||||
if (uiManager) {
|
||||
uiManager->getGameScreen().triggerDing(newLevel);
|
||||
uiManager->getGameScreen().toastManager().triggerDing(newLevel);
|
||||
}
|
||||
if (renderer) {
|
||||
renderer->triggerLevelUpEffect(renderer->getCharacterPosition());
|
||||
|
|
@ -2938,7 +2938,7 @@ void Application::setupUICallbacks() {
|
|||
// Achievement earned callback — show toast banner
|
||||
gameHandler->setAchievementEarnedCallback([this](uint32_t achievementId, const std::string& name) {
|
||||
if (uiManager) {
|
||||
uiManager->getGameScreen().triggerAchievementToast(achievementId, name);
|
||||
uiManager->getGameScreen().toastManager().triggerAchievementToast(achievementId, name);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue