shithub: lua9

Download patch

ref: 9b93e2f3b8bfb3010e224ae540c3d74e53f308c2
parent: bf655bb17b29d15adba296dd9bd1ae1d8983e744
author: telephil9 <telephil9@gmail.com>
date: Tue Oct 27 09:46:56 EDT 2020

Add event.moveto() function

--- a/event.c
+++ b/event.c
@@ -147,6 +147,16 @@
 }
 
 static int
+lmoveto(lua_State *L)
+{
+	Point p;
+
+	p = checkpoint(L, 1);
+	emoveto(p);
+	return 0;
+}
+
+static int
 lenter(lua_State *L)
 {
 	char buf[1024]; /* XXX do it better */
@@ -174,8 +184,9 @@
 	{ "canmouse",  lcanmouse },
 	{ "cankbd",    lcankbd },
 	{ "timer",     ltimer },
-	{ "enter",     lenter },
 	{ "menuhit",   lmenuhit },
+	{ "moveto",    lmoveto },
+	{ "enter",     lenter },
 	{ NULL, NULL }
 };