aboutsummaryrefslogtreecommitdiff
path: root/src/lua/embed/mouse.lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/embed/mouse.lua.h')
-rw-r--r--src/lua/embed/mouse.lua.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/lua/embed/mouse.lua.h b/src/lua/embed/mouse.lua.h
index eb5a3ad..f57d08c 100644
--- a/src/lua/embed/mouse.lua.h
+++ b/src/lua/embed/mouse.lua.h
@@ -1,11 +1,18 @@
-static const char mouse_lua[] =
-{45,45,91,91,32,13,10,9,109,111,117,115,101,32,101,120,116,101,110,115,105,111,
-110,13,10,93,93,32,13,10,13,10,106,105,110,46,109,111,117,115,101,32,61,32,
-106,105,110,46,109,111,117,115,101,32,111,114,32,123,125,32,13,10,13,10,108,
-111,99,97,108,32,98,117,116,116,111,110,32,61,32,123,125,32,13,10,13,10,102,
-117,110,99,116,105,111,110,32,106,105,110,46,109,111,117,115,101,46,105,115,
-68,111,119,110,40,98,116,110,41,32,13,10,9,114,101,116,117,114,110,32,98,117,
-116,116,111,110,91,98,116,110,93,13,10,101,110,100,32,13,10,13,10,102,117,110,
-99,116,105,111,110,32,106,105,110,46,109,111,117,115,101,46,115,101,116,40,98,
-116,110,44,32,115,116,97,116,117,115,41,32,13,10,9,98,117,116,116,111,110,91,
-98,116,110,93,32,61,32,115,116,97,116,117,115,13,10,101,110,100,32,13,10};
+static const char* mouse_lua = R"(
+--[[
+ jin.mouse extension
+]]
+
+jin.mouse = jin.mouse or {}
+
+local button = {}
+
+function jin.mouse.isDown(btn)
+ return button[btn]
+end
+
+function jin.mouse.set(btn, status)
+ button[btn] = status
+end
+
+)"; \ No newline at end of file