summaryrefslogtreecommitdiff
path: root/examples/n-patches/main.lua
diff options
context:
space:
mode:
authorjussi2023-04-06 12:31:37 +0300
committerjussi2023-04-06 12:31:37 +0300
commit2526c9732e7ea35bc9ed3e43a4db77b7e6364c5a (patch)
tree825775577403d9341045571adb266173513c4bbd /examples/n-patches/main.lua
parent198a74c0aa27389c062c47bc29187c58a9d6c4a1 (diff)
downloadreilua-enhanced-2526c9732e7ea35bc9ed3e43a4db77b7e6364c5a.tar.gz
reilua-enhanced-2526c9732e7ea35bc9ed3e43a4db77b7e6364c5a.tar.bz2
reilua-enhanced-2526c9732e7ea35bc9ed3e43a4db77b7e6364c5a.zip
All global variables and functions are not in global RL table. doc_parser creates also ReiLua_API.lua.
Diffstat (limited to 'examples/n-patches/main.lua')
-rw-r--r--examples/n-patches/main.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/n-patches/main.lua b/examples/n-patches/main.lua
index 91ea409..a4491bc 100644
--- a/examples/n-patches/main.lua
+++ b/examples/n-patches/main.lua
@@ -2,24 +2,24 @@ local dstRec = { 160.0, 160.0, 8.0, 8.0 };
local origin = { 0.0, 0.0 }
-- local ninePatchInfo = { { 0.0, 0.0, 24.0, 24.0 }, 8, 8, 8, 8, NPATCH_NINE_PATCH }
-local ninePatchInfo = { source = { 0, 0, 24.0, 24.0 }, left = 8, top = 8, right = 8, bottom = 8, layout = NPATCH_NINE_PATCH }
+local ninePatchInfo = { source = { 0, 0, 24.0, 24.0 }, left = 8, top = 8, right = 8, bottom = 8, layout = RL.NPATCH_NINE_PATCH }
-local nPatchTexture = RL_LoadTexture( RL_GetBasePath().."../resources/images/ui_border.png" )
+local nPatchTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/ui_border.png" )
-function init()
- RL_SetWindowTitle( "N-Patches" )
- RL_SetWindowState( FLAG_VSYNC_HINT )
+function RL.init()
+ RL.SetWindowTitle( "N-Patches" )
+ RL.SetWindowState( RL.FLAG_VSYNC_HINT )
end
-function process( delta )
- local mousePosition = RL_GetMousePosition();
+function RL.process( delta )
+ local mousePosition = RL.GetMousePosition();
-- Resize the n-patch based on mouse position
dstRec[3] = mousePosition[1] - dstRec[1];
dstRec[4] = mousePosition[2] - dstRec[2];
end
-function draw()
- RL_ClearBackground( RAYWHITE )
- RL_DrawTextureNPatch( nPatchTexture, ninePatchInfo, dstRec, origin, 0.0, WHITE )
+function RL.draw()
+ RL.ClearBackground( RL.RAYWHITE )
+ RL.DrawTextureNPatch( nPatchTexture, ninePatchInfo, dstRec, origin, 0.0, RL.WHITE )
end