summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-09-28 23:20:52 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-28 23:20:52 (GMT)
commit9a42e47eb0369ddabe752c37b98ed3662a983694 (patch)
tree1a9fbc24e0bc17d41152657e2aa7606f818a52fb /src/cat/LuaScriptInterface.h
parent261c654ca0978cdc39c9670050c307fe0065fac1 (diff)
downloadpowder-9a42e47eb0369ddabe752c37b98ed3662a983694.zip
powder-9a42e47eb0369ddabe752c37b98ed3662a983694.tar.gz
Move old Lua API into another file, make the old drawin API have the old position quirk for rects, new graphics (gfx) api with drawRect, fillRect, drawTect, drawLine and textSize functions.
Diffstat (limited to 'src/cat/LuaScriptInterface.h')
-rw-r--r--src/cat/LuaScriptInterface.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h
index 9758157..2def100 100644
--- a/src/cat/LuaScriptInterface.h
+++ b/src/cat/LuaScriptInterface.h
@@ -45,7 +45,8 @@ namespace pim
#define LUACON_EL_MODIFIED_MENUS 0x4
class TPTScriptInterface;
-class LuaScriptInterface: public CommandInterface {
+class LuaScriptInterface: public CommandInterface
+{
int luacon_mousex, luacon_mousey, luacon_selectedl, luacon_selectedr, luacon_mousebutton, luacon_brushx, luacon_brushy;
bool luacon_mousedown;
bool currentCommand;
@@ -84,6 +85,14 @@ class LuaScriptInterface: public CommandInterface {
//VM
void initVirtualMachineAPI();
static int virtualMachine_loadProgram(lua_State * l);
+
+ void initGraphicsAPI();
+ static int graphics_textSize(lua_State * l);
+ static int graphics_drawText(lua_State * l);
+ static int graphics_drawLine(lua_State * l);
+ static int graphics_drawRect(lua_State * l);
+ static int graphics_fillRect(lua_State * l);
+
public:
ui::Window * Window;
lua_State *l;