ref: 76a21e425a3f73a1823e649f5f2a5d478e9755de
parent: d3f0441e3eded7ec19e9929580dd92135693837b
author: telephil9 <telephil9@gmail.com>
date: Sun Oct 25 16:20:55 EDT 2020
event() now properly returns mouse info Returned Event table was missing the mouse field. Now the table include all mouse event info (buttons, xy and msec).
--- a/event.c
+++ b/event.c
@@ -32,6 +32,14 @@
lua_newtable(L);
lua_pushinteger(L, ev.kbdc);
lua_setfield(L, -2, "kbdc");
+ lua_newtable(L);
+ lua_pushinteger(L, ev.mouse.buttons);
+ lua_setfield(L, -2, "buttons");
+ pushpoint(L, ev.mouse.xy);
+ lua_setfield(L, -2, "xy");
+ lua_pushinteger(L, ev.mouse.msec);
+ lua_setfield(L, -2, "msec");
+ lua_setfield(L, -2, "mouse");
return 2;
}