From e3461e90531345650fe70ada38d875a68f87f416 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 4 Jul 2023 19:27:16 +1000 Subject: Start of Interface callbacks, starting with a bindCanvas function for the whole screen --- source/game/scripting/StarLuaRoot.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/game/scripting/StarLuaRoot.hpp') diff --git a/source/game/scripting/StarLuaRoot.hpp b/source/game/scripting/StarLuaRoot.hpp index 7335952..a26cf04 100644 --- a/source/game/scripting/StarLuaRoot.hpp +++ b/source/game/scripting/StarLuaRoot.hpp @@ -21,6 +21,9 @@ public: bool scriptLoaded(String const& assetPath) const; void unloadScript(String const& assetPath); + void restart(); + void shutdown(); + // A script context can be created from the combination of several scripts, // the functions / data in each script will be loaded in order, so that later // specified scripts will overwrite previous ones. @@ -39,8 +42,9 @@ public: size_t scriptCacheMemoryUsage() const; void clearScriptCache() const; - LuaEngine& luaEngine() const; + void addCallbacks(String const& groupName, LuaCallbacks const& callbacks); + LuaEngine& luaEngine() const; private: class ScriptCache { public: @@ -57,7 +61,9 @@ private: }; LuaEnginePtr m_luaEngine; + StringMap m_luaCallbacks; shared_ptr m_scriptCache; + ListenerPtr m_rootReloadListener; String m_storageDirectory; -- cgit v1.2.3