From bf7418073d727e70a6564d9b2d79a1430cdc75ac Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 4 Jul 2023 20:45:43 +1000 Subject: Move input callback creation --- source/client/StarClientApplication.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/client/StarClientApplication.cpp') diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index cb5b2de..d58ed69 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -16,6 +16,7 @@ #include "StarRootLoader.hpp" #include "StarInterfaceLuaBindings.hpp" +#include "StarInputLuaBindings.hpp" namespace Star { @@ -483,6 +484,7 @@ void ClientApplication::changeState(MainAppState newState) { m_playerStorage = make_shared(m_root->toStoragePath("player")); m_statistics = make_shared(m_root->toStoragePath("player"), appController()->statisticsService()); m_universeClient = make_shared(m_playerStorage, m_statistics); + m_universeClient->setLuaCallbacks("input", LuaBindings::makeInputCallbacks()); m_mainMixer->setUniverseClient(m_universeClient); m_titleScreen = make_shared(m_playerStorage, m_mainMixer->mixer()); @@ -601,6 +603,7 @@ void ClientApplication::changeState(MainAppState newState) { m_worldPainter = make_shared(); m_mainInterface = make_shared(m_universeClient, m_worldPainter, m_cinematicOverlay); m_universeClient->setLuaCallbacks("interface", LuaBindings::makeInterfaceCallbacks(m_mainInterface.get())); + m_mainMixer->setWorldPainter(m_worldPainter); if (auto renderer = Application::renderer()) { -- cgit v1.2.3