summaryrefslogtreecommitdiff
path: root/src/cat/LuaLabel.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/LuaLabel.cpp
parent9bc06a2fc4d7d4ce82da7323a567402d7688d3d3 (diff)
downloadpowder-6d991c10d7800859a39e447ec7f95b861d5fb69f.zip
powder-6d991c10d7800859a39e447ec7f95b861d5fb69f.tar.gz
Logging for UI component events, tr
Diffstat (limited to 'src/cat/LuaLabel.cpp')
-rw-r--r--src/cat/LuaLabel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cat/LuaLabel.cpp b/src/cat/LuaLabel.cpp
index 5ab3d1c..c1d9497 100644
--- a/src/cat/LuaLabel.cpp
+++ b/src/cat/LuaLabel.cpp
@@ -6,6 +6,7 @@ extern "C"
}
#include <iostream>
+#include "LuaScriptInterface.h"
#include "LuaLabel.h"
#include "interface/Label.h"
@@ -28,6 +29,11 @@ LuaLabel::LuaLabel(lua_State * l)
int sizeY = luaL_optinteger(l, 4, 10);
std::string text = luaL_optstring(l, 5, "");
+ lua_pushstring(l, "Luacon_ci");
+ lua_gettable(l, LUA_REGISTRYINDEX);
+ ci = (LuaScriptInterface*)lua_touserdata(l, -1);
+ lua_pop(l, 1);
+
label = new ui::Label(ui::Point(posX, posY), ui::Point(sizeX, sizeY), text);
}