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

summaryrefslogtreecommitdiff
path: root/source/frontend/StarMainInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/frontend/StarMainInterface.cpp')
-rw-r--r--source/frontend/StarMainInterface.cpp32
1 files changed, 10 insertions, 22 deletions
diff --git a/source/frontend/StarMainInterface.cpp b/source/frontend/StarMainInterface.cpp
index a0ed3ae..0c84933 100644
--- a/source/frontend/StarMainInterface.cpp
+++ b/source/frontend/StarMainInterface.cpp
@@ -65,24 +65,14 @@ GuiMessage::GuiMessage() : message(), cooldown(), springState() {}
GuiMessage::GuiMessage(String const& message, float cooldown, float spring)
: message(message), cooldown(cooldown), springState(spring) {}
-MainInterface::MainInterface(UniverseClientPtr client, WorldPainterPtr painter, CinematicPtr cinematicOverlay) {
- m_state = Running;
-
- m_guiContext = GuiContext::singletonPtr();
-
- m_client = client;
- m_worldPainter = painter;
- m_cinematicOverlay = cinematicOverlay;
-
- m_disableHud = false;
-
- m_cursorScreenPos = Vec2I();
- m_state = Running;
-
- m_config = MainInterfaceConfig::loadFromAssets();
-
- m_containerInteractor = make_shared<ContainerInteractor>();
-
+MainInterface::MainInterface(UniverseClientPtr client, WorldPainterPtr painter, CinematicPtr cinematicOverlay)
+ : m_guiContext(GuiContext::singletonPtr())
+ , m_config(MainInterfaceConfig::loadFromAssets())
+ , m_client(std::move(client))
+ , m_worldPainter(std::move(painter))
+ , m_cinematicOverlay(std::move(cinematicOverlay))
+ , m_containerInteractor(make_shared<ContainerInteractor>())
+{
GuiReader itemSlotReader;
m_cursorItem = convert<ItemSlotWidget>(itemSlotReader.makeSingle("cursorItemSlot", m_config->cursorItemSlot));
@@ -90,9 +80,7 @@ MainInterface::MainInterface(UniverseClientPtr client, WorldPainterPtr painter,
m_debugSpatialClearTimer = GameTimer(m_config->debugSpatialClearTime);
m_debugMapClearTimer = GameTimer(m_config->debugMapClearTime);
- m_debugTextRect = RectF::null();
- m_lastMouseoverTarget = NullEntityId;
m_stickyTargetingTimer = GameTimer(m_config->monsterHealthBarTime);
m_inventoryWindow = make_shared<InventoryPane>(this, m_client->mainPlayer(), m_containerInteractor);
@@ -183,7 +171,7 @@ MainInterface::MainInterface(UniverseClientPtr client, WorldPainterPtr painter,
m_paneManager.registerPane(MainInterfacePanes::PlanetText, PaneLayer::Hud, planetName);
m_nameplatePainter = make_shared<NameplatePainter>();
- m_questIndicatorPainter = make_shared<QuestIndicatorPainter>(client);
+ m_questIndicatorPainter = make_shared<QuestIndicatorPainter>(m_client);
m_chatBubbleManager = make_shared<ChatBubbleManager>();
m_paneManager.displayRegisteredPane(MainInterfacePanes::ActionBar);
@@ -1142,7 +1130,7 @@ void MainInterface::renderMonsterHealthBar() {
Drawable::scaleAll(portrait, 1.0f / m_portraitScale);
for (auto drawable : portrait)
- m_guiContext->drawDrawable(move(drawable), backgroundCenterPos + portraitOffset, portraitScale);
+ m_guiContext->drawDrawable(std::move(drawable), backgroundCenterPos + portraitOffset, portraitScale);
m_guiContext->resetInterfaceScissorRect();
}