summaryrefslogtreecommitdiff
path: root/examples/n-patches/main.lua
diff options
context:
space:
mode:
authorjussi2024-11-21 23:25:28 +0200
committerjussi2024-11-21 23:25:28 +0200
commitc9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d (patch)
treedfd26a87fb2b2f702f77728b98a1e6c193684631 /examples/n-patches/main.lua
parentd96e33bb1772c28f630de32e09201c0cdea6f896 (diff)
downloadreilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.gz
reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.bz2
reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.zip
RL.config and InitWindow.
Diffstat (limited to 'examples/n-patches/main.lua')
-rw-r--r--examples/n-patches/main.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/n-patches/main.lua b/examples/n-patches/main.lua
index c45b828..cdd259f 100644
--- a/examples/n-patches/main.lua
+++ b/examples/n-patches/main.lua
@@ -6,18 +6,16 @@ Rect = require( "rectangle" )
local dstRec = Rect:new( 100.0, 100.0, 8.0, 8.0 )
local origin = Vec2:new( 0.0, 0.0 )
local stretched = true
-
--- local ninePatchInfo = { source = { 0, 0, 24, 24 }, 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 ninePatchInfo = { source = { 0, 0, 96, 96 }, left = 32, top = 32, right = 32, bottom = 32, layout = RL.NPATCH_NINE_PATCH }
-- local ninePatchInfo = { source = { 0, 0, 96, 96 }, left = 32, top = 32, right = 32, bottom = 32, layout = RL.NPATCH_THREE_PATCH_VERTICAL }
-- local ninePatchInfo = { source = { 0, 0, 96, 96 }, left = 32, top = 32, right = 32, bottom = 32, layout = RL.NPATCH_THREE_PATCH_HORIZONTAL }
-local nPatchTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/nPatch.png" )
+local nPatchTexture = nil
function RL.init()
RL.SetWindowTitle( "N-Patches" )
RL.SetWindowState( RL.FLAG_VSYNC_HINT )
+
+ nPatchTexture = RL.LoadTexture( RL.GetBasePath().."../resources/images/nPatch.png" )
end
function RL.update( delta )