summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cat/LuaScriptInterface.h')
-rw-r--r--src/cat/LuaScriptInterface.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h
index 96fd66b..37adc65 100644
--- a/src/cat/LuaScriptInterface.h
+++ b/src/cat/LuaScriptInterface.h
@@ -18,6 +18,11 @@ extern "C"
#include "CommandInterface.h"
#include "simulation/Simulation.h"
+namespace ui
+{
+ class Window;
+}
+
//Because lua only has bindings for C, we're going to have to go outside "outside" the LuaScriptInterface, this means we can only have one instance :(
#define LOCAL_LUA_DIR "Lua"
@@ -53,7 +58,14 @@ class LuaScriptInterface: public CommandInterface {
static int elements_property(lua_State * l);
static int elements_loadDefault(lua_State * l);
static int elements_free(lua_State * l);
+
+ //Interface
+ void initInterfaceAPI();
+ static int interface_showWindow(lua_State * l);
+ static int interface_closeWindow(lua_State * l);
+ static int interface_addComponent(lua_State * l);
public:
+ ui::Window * Window;
lua_State *l;
LuaScriptInterface(GameModel * m);
virtual bool OnBrushChanged(int brushType, int rx, int ry);
@@ -64,6 +76,8 @@ public:
virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt);
virtual void OnTick();
+ virtual void Init();
+ virtual void SetWindow(ui::Window * window);
virtual int Command(std::string command);
virtual std::string FormatCommand(std::string command);
virtual ~LuaScriptInterface();