diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-04 17:52:34 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-04 17:52:34 (GMT) |
| commit | 89cdeef9ad9c164e9f484cded3096bcbc72b7207 (patch) | |
| tree | 6a26f6313e7cf45a277756890e087201704bab90 /src/cat/LuaScriptInterface.h | |
| parent | 299c1da9ae6b79ddb6cc39477ad31fb1d2a3c566 (diff) | |
| download | powder-89cdeef9ad9c164e9f484cded3096bcbc72b7207.zip powder-89cdeef9ad9c164e9f484cded3096bcbc72b7207.tar.gz | |
CommandInterface, Mouse, Keyboard and Tick events, on screen log, print redirected to tpt.log
Diffstat (limited to 'src/cat/LuaScriptInterface.h')
| -rw-r--r-- | src/cat/LuaScriptInterface.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/cat/LuaScriptInterface.h b/src/cat/LuaScriptInterface.h index 2fcfc33..b3ecd7a 100644 --- a/src/cat/LuaScriptInterface.h +++ b/src/cat/LuaScriptInterface.h @@ -34,10 +34,18 @@ extern "C" #define LUACON_EL_MODIFIED_MENUS 0x4 class LuaScriptInterface: public CommandInterface { + int luacon_mousex, luacon_mousey, luacon_selectedl, luacon_selectedr, luacon_mousebutton; + bool luacon_mousedown; public: lua_State *l; LuaScriptInterface(GameModel * m); - virtual void Tick(); + virtual bool OnMouseMove(int x, int y, int dx, int dy); + virtual bool OnMouseDown(int x, int y, unsigned button); + virtual bool OnMouseUp(int x, int y, unsigned button); + virtual bool OnMouseWheel(int x, int y, int d); + virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnTick(float dt); virtual int Command(std::string command); virtual std::string FormatCommand(std::string command); virtual ~LuaScriptInterface(); |
