summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-01 19:13:51 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-01 19:13:51 (GMT)
commit6d991c10d7800859a39e447ec7f95b861d5fb69f (patch)
tree8244e80d38182a527248235340a634db923e88cd /src/cat/LuaScriptInterface.cpp
parent9bc06a2fc4d7d4ce82da7323a567402d7688d3d3 (diff)
downloadpowder-6d991c10d7800859a39e447ec7f95b861d5fb69f.zip
powder-6d991c10d7800859a39e447ec7f95b861d5fb69f.tar.gz
Logging for UI component events, tr
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
-rw-r--r--src/cat/LuaScriptInterface.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index 18a9886..618319d 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -12,6 +12,7 @@
#include <locale>
#include "Config.h"
#include "Format.h"
+#include "LuaLuna.h"
#include "LuaScriptInterface.h"
#include "TPTScriptInterface.h"
#include "dialogues/ErrorMessage.h"
@@ -25,7 +26,6 @@
#include "LuaBit.h"
-#include "LuaLuna.h"
#include "LuaWindow.h"
#include "LuaButton.h"
#include "LuaLabel.h"
@@ -48,11 +48,16 @@ LuaScriptInterface::LuaScriptInterface(GameController * c, GameModel * m):
luacon_ren = m->GetRenderer();
luacon_ci = this;
+
//New TPT API
l = lua_open();
luaL_openlibs(l);
luaopen_bit(l);
+ lua_pushstring(l, "Luacon_ci");
+ lua_pushlightuserdata(l, this);
+ lua_settable(l, LUA_REGISTRYINDEX);
+
initInterfaceAPI();
initRendererAPI();
initElementsAPI();