summaryrefslogtreecommitdiff
path: root/src/cat/LuaCheckbox.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-17 11:20:58 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-17 11:20:58 (GMT)
commit6e44ebc358d1206c147f514225373da07b43c015 (patch)
tree35e97c28991c4aff46a9e5a4182b53dedb26e7ee /src/cat/LuaCheckbox.h
parente52e9ce91ccca13115fec0fdb0111e7e5d39d10d (diff)
downloadpowder-6e44ebc358d1206c147f514225373da07b43c015.zip
powder-6e44ebc358d1206c147f514225373da07b43c015.tar.gz
Checkbox, Slider and ProgressBar components for ui API
Diffstat (limited to 'src/cat/LuaCheckbox.h')
-rw-r--r--src/cat/LuaCheckbox.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cat/LuaCheckbox.h b/src/cat/LuaCheckbox.h
new file mode 100644
index 0000000..479cab2
--- /dev/null
+++ b/src/cat/LuaCheckbox.h
@@ -0,0 +1,33 @@
+#pragma once
+
+extern "C" {
+ #include "lua.h"
+ #include "lauxlib.h"
+ #include "lualib.h"
+}
+
+#include "LuaLuna.h"
+#include "LuaComponent.h"
+
+namespace ui
+{
+ class Checkbox;
+}
+
+class LuaScriptInterface;
+
+class LuaCheckbox: public LuaComponent
+{
+ ui::Checkbox * checkbox;
+ int actionFunction;
+ void triggerAction();
+ int action(lua_State * l);
+ int checked(lua_State * l);
+ int text(lua_State * l);
+public:
+ static const char className[];
+ static Luna<LuaCheckbox>::RegType methods[];
+
+ LuaCheckbox(lua_State * l);
+ ~LuaCheckbox();
+}; \ No newline at end of file