diff options
| author | cracker64 <cracker642@gmail.com> | 2011-09-24 03:25:50 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2011-09-24 03:25:50 (GMT) |
| commit | 789049b269429107df2f1b73d3e968fea1ab4243 (patch) | |
| tree | dda35b08261a8e5e9a47c9c1c18bf834ca8a2269 /src/luaconsole.c | |
| parent | c750e659a741e17057c880c86d607330125be3ec (diff) | |
| download | powder-789049b269429107df2f1b73d3e968fea1ab4243.zip powder-789049b269429107df2f1b73d3e968fea1ab4243.tar.gz | |
Can see selected elements from Lua, tpt.selectedl or tpt.selectedr
Diffstat (limited to 'src/luaconsole.c')
| -rw-r--r-- | src/luaconsole.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/luaconsole.c b/src/luaconsole.c index 2a2519c..1e03919 100644 --- a/src/luaconsole.c +++ b/src/luaconsole.c @@ -77,6 +77,10 @@ void luacon_open(){ lua_setfield(l, tptProperties, "mousex"); lua_pushinteger(l, 0); lua_setfield(l, tptProperties, "mousey"); + lua_pushinteger(l, 0); + lua_setfield(l, tptProperties, "selectedl"); + lua_pushinteger(l, 0); + lua_setfield(l, tptProperties, "selectedr"); } int luacon_keyevent(int key, int modifier, int event){ int i = 0, kpcontinue = 1; @@ -115,12 +119,16 @@ int luacon_mouseevent(int mx, int my, int mb, int event){ } return mpcontinue; } -int luacon_step(int mx, int my){ +int luacon_step(int mx, int my, int selectl, int selectr){ int tempret = 0, tempb, i, callret; + lua_pushinteger(l, selectr); + lua_pushinteger(l, selectl); lua_pushinteger(l, my); lua_pushinteger(l, mx); lua_setfield(l, tptProperties, "mousex"); lua_setfield(l, tptProperties, "mousey"); + lua_setfield(l, tptProperties, "selectedl"); + lua_setfield(l, tptProperties, "selectedr"); if(step_functions[0]){ //Set mouse globals for(i = 0; i<6; i++){ |
