summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-02 22:55:08 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-02 22:55:08 (GMT)
commit4e09a077a4d7494d1c1e1f494cbc36fa9abcb19c (patch)
treef76cf74aa260678cd230dba8955d378c5fa392f0 /src/cat/LuaScriptInterface.cpp
parentb7616a91d860871a3e4ac46cba957633a93acb59 (diff)
downloadpowder-4e09a077a4d7494d1c1e1f494cbc36fa9abcb19c.zip
powder-4e09a077a4d7494d1c1e1f494cbc36fa9abcb19c.tar.gz
Textbox component for Lua interface API
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
-rw-r--r--src/cat/LuaScriptInterface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index 618319d..78a6de5 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -29,6 +29,7 @@
#include "LuaWindow.h"
#include "LuaButton.h"
#include "LuaLabel.h"
+#include "LuaTextbox.h"
#ifdef WIN
#include <direct.h>
@@ -291,6 +292,7 @@ void LuaScriptInterface::initInterfaceAPI()
Luna<LuaWindow>::Register(l);
Luna<LuaButton>::Register(l);
Luna<LuaLabel>::Register(l);
+ Luna<LuaTextbox>::Register(l);
}
int LuaScriptInterface::interface_addComponent(lua_State * l)
@@ -301,6 +303,8 @@ int LuaScriptInterface::interface_addComponent(lua_State * l)
component = Luna<LuaButton>::get(luaComponent)->GetComponent();
else if(luaComponent = Luna<LuaLabel>::tryGet(l, 1))
component = Luna<LuaLabel>::get(luaComponent)->GetComponent();
+ else if(luaComponent = Luna<LuaTextbox>::tryGet(l, 1))
+ component = Luna<LuaTextbox>::get(luaComponent)->GetComponent();
else
luaL_typerror(l, 1, "Component");
if(luacon_ci->Window && component)