summaryrefslogtreecommitdiff
path: root/ReiLua_API.lua
diff options
context:
space:
mode:
authorjussi2023-08-18 01:23:30 +0300
committerjussi2023-08-18 01:23:30 +0300
commitc911ba043116e9d0e321311ddf27b0170d74410b (patch)
treee51f7141a16400f794d535f999a37ed176271861 /ReiLua_API.lua
parentb7b46ada041ad56b1bc84fea3062464b702135c5 (diff)
downloadreilua-enhanced-c911ba043116e9d0e321311ddf27b0170d74410b.tar.gz
reilua-enhanced-c911ba043116e9d0e321311ddf27b0170d74410b.tar.bz2
reilua-enhanced-c911ba043116e9d0e321311ddf27b0170d74410b.zip
RL.event function with input events.
Diffstat (limited to 'ReiLua_API.lua')
-rw-r--r--ReiLua_API.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/ReiLua_API.lua b/ReiLua_API.lua
index d00fd2e..0b1551f 100644
--- a/ReiLua_API.lua
+++ b/ReiLua_API.lua
@@ -11,6 +11,9 @@ function RL.init() end
function RL.process( delta ) end
---This function will be called every frame after process and it should have all rendering related functions. Note: Engine will call Raylib functions 'BeginDrawing()' before this function call and 'EndDrawing()' after it. You can still use RL.BeginDrawing() and RL.EndDrawing() manually from anywhere.
function RL.draw() end
+---This function will be called on events input. Content of event table is determined by event type.
+---@param event table
+function RL.event( event ) end
---This function can be used for custom log message handling.
---@param logLevel integer
---@param message string
@@ -695,6 +698,21 @@ RL.GL_DEPTH_BUFFER_BIT=256
RL.GL_STENCIL_BUFFER_BIT=1024
RL.GL_NEAREST=9728
RL.GL_LINEAR=9729
+
+-- Globals - GLFW
+
+RL.GLFW_RELEASE=0
+RL.GLFW_PRESS=1
+RL.GLFW_REPEAT=2
+
+-- Globals - Event
+
+RL.EVENT_KEY=0
+RL.EVENT_CHAR=1
+RL.EVENT_MOUSE_BUTTON=2
+RL.EVENT_MOUSE_CURSOR_POS=3
+RL.EVENT_MOUSE_SCROLL=4
+RL.EVENT_CURSOR_ENTER=5
-- Core - Window
---Check if window has been initialized successfully