summaryrefslogtreecommitdiff
path: root/examples/raygui_lib
diff options
context:
space:
mode:
authorjussi2024-11-21 23:25:28 +0200
committerjussi2024-11-21 23:25:28 +0200
commitc9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d (patch)
treedfd26a87fb2b2f702f77728b98a1e6c193684631 /examples/raygui_lib
parentd96e33bb1772c28f630de32e09201c0cdea6f896 (diff)
downloadreilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.gz
reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.tar.bz2
reilua-enhanced-c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d.zip
RL.config and InitWindow.
Diffstat (limited to 'examples/raygui_lib')
-rw-r--r--examples/raygui_lib/main.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/raygui_lib/main.lua b/examples/raygui_lib/main.lua
index bf7da18..81fa23f 100644
--- a/examples/raygui_lib/main.lua
+++ b/examples/raygui_lib/main.lua
@@ -11,8 +11,8 @@ Gui = Raygui:new()
local grid = {}
local windowbox = {}
local tabBar = {}
-local texture = RL.LoadTexture( RL.GetBasePath().."../resources/images/gradient.png" )
-local textureRect = Rect:new( 0, 0, RL.GetTextureSize( texture )[1], RL.GetTextureSize( texture )[2] )
+local texture = nil
+local textureRect = Rect:new()
local function closeTab( self, id )
local splits = Util.split( tabBar.text, ";" )
@@ -55,6 +55,9 @@ function RL.init()
RL.GuiSetStyle( RL.DEFAULT, RL.TEXT_LINE_SPACING, 20 )
+ texture = RL.LoadTexture( RL.GetBasePath().."../resources/images/gradient.png" )
+ textureRect = Rect:new( 0, 0, RL.GetTextureSize( texture )[1], RL.GetTextureSize( texture )[2] )
+
local label = Gui:Label(
Rect:new( 16, 16, 64, 32 ),
"Cat"