summaryrefslogtreecommitdiff
path: root/examples/raygui_lib/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'examples/raygui_lib/main.lua')
-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"