Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarMainInterface.cpp
diff options
context:
space:
mode:
authorVladimir Krasheninnikov <boba09@list.ru>2025-02-22 13:37:27 +0100
committerVladimir Krasheninnikov <boba09@list.ru>2025-02-22 13:37:27 +0100
commitb28ef790ea54ac75be3cc4937525ceacbc8656fc (patch)
treeaf1802cff6222eb5a848bf84dc449a08a0cdbfb6 /source/frontend/StarMainInterface.cpp
parent50d7386bbbf6b712f007789c7858aa95b83fda92 (diff)
Create CharacterSwap pane
Diffstat (limited to 'source/frontend/StarMainInterface.cpp')
-rw-r--r--source/frontend/StarMainInterface.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/frontend/StarMainInterface.cpp b/source/frontend/StarMainInterface.cpp
index 8468f7f..e3b28eb 100644
--- a/source/frontend/StarMainInterface.cpp
+++ b/source/frontend/StarMainInterface.cpp
@@ -57,6 +57,7 @@
#include "StarContainerInteractor.hpp"
#include "StarChatBubbleManager.hpp"
#include "StarNpc.hpp"
+#include "StarCharSelection.hpp"
namespace Star {
@@ -168,6 +169,14 @@ MainInterface::MainInterface(UniverseClientPtr client, WorldPainterPtr painter,
planetName->addChild("planetText", m_planetText);
m_paneManager.registerPane(MainInterfacePanes::PlanetText, PaneLayer::Hud, planetName);
+ auto charSelectionMenu = make_shared<CharSelectionPane>(m_client->playerStorage(), [=]() {}, [=](PlayerPtr mainPlayer) {
+ m_client->playerStorage()->moveToFront(mainPlayer->uuid());
+ m_client->switchPlayer(mainPlayer->name());
+ m_paneManager.dismissRegisteredPane(MainInterfacePanes::CharacterSwap); }, [=](Uuid) {});
+ charSelectionMenu->setAnchor(PaneAnchor::Center);
+
+ m_paneManager.registerPane(MainInterfacePanes::CharacterSwap, PaneLayer::ModalWindow, charSelectionMenu);
+
m_nameplatePainter = make_shared<NameplatePainter>();
m_questIndicatorPainter = make_shared<QuestIndicatorPainter>(m_client);
m_chatBubbleManager = make_shared<ChatBubbleManager>();