summaryrefslogtreecommitdiff
path: root/src/cat/LuaButton.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-31 18:39:11 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-31 18:39:11 (GMT)
commit493a32a1b28f15cf02bb69c3735b9a411448c523 (patch)
tree838b39db197c1f9cab5740703bb03f9b24702c56 /src/cat/LuaButton.h
parent322d224fa7a1d5f155c87596bb2f5927989e9933 (diff)
downloadpowder-493a32a1b28f15cf02bb69c3735b9a411448c523.zip
powder-493a32a1b28f15cf02bb69c3735b9a411448c523.tar.gz
Some Lua interface API stuff
Diffstat (limited to 'src/cat/LuaButton.h')
-rw-r--r--src/cat/LuaButton.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cat/LuaButton.h b/src/cat/LuaButton.h
new file mode 100644
index 0000000..ef5bb54
--- /dev/null
+++ b/src/cat/LuaButton.h
@@ -0,0 +1,33 @@
+#pragma once
+
+extern "C" {
+ #include "lua.h"
+ #include "lauxlib.h"
+ #include "lualib.h"
+}
+
+#include "LuaLuna.h"
+
+namespace ui
+{
+ class Button;
+}
+
+class LuaButton
+{
+ ui::Button * button;
+ int actionFunction;
+ lua_State * l;
+ void triggerAction();
+ int action(lua_State * l);
+ int text(lua_State * l);
+ int position(lua_State * l);
+ int size(lua_State * l);
+public:
+ static const char className[];
+ static Luna<LuaButton>::RegType methods[];
+
+ ui::Button * GetComponent() { return button; }
+ LuaButton(lua_State * l);
+ ~LuaButton();
+}; \ No newline at end of file