summaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorjussi2024-11-22 14:57:31 +0200
committerjussi2024-11-22 14:57:31 +0200
commitcb2b0e4dff5e1d98054f9e5f809fd3a14cd220a1 (patch)
treee64efb0dedce13c03011186de34c72a06cad1757 /src/core.c
parentc9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d (diff)
downloadreilua-enhanced-cb2b0e4dff5e1d98054f9e5f809fd3a14cd220a1.tar.gz
reilua-enhanced-cb2b0e4dff5e1d98054f9e5f809fd3a14cd220a1.tar.bz2
reilua-enhanced-cb2b0e4dff5e1d98054f9e5f809fd3a14cd220a1.zip
WindowShouldClose and custom main loop example.
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 3ca5a3e..c5736da 100644
--- a/src/core.c
+++ b/src/core.c
@@ -55,6 +55,18 @@ int lcoreCloseWindow( lua_State* L ) {
}
/*
+> RL.WindowShouldClose()
+
+Check if application should close (KEY_ESCAPE pressed or windows close icon clicked).
+Note! Not needed unless you want to make custom main loop
+*/
+int lcoreWindowShouldClose( lua_State* L ) {
+ lua_pushboolean( L, WindowShouldClose() );
+
+ return 1;
+}
+
+/*
> state = RL.IsWindowReady()
Check if window has been initialized successfully