From c9ebe23d6282e96b410dc7687e0be1c4f3ba1b4d Mon Sep 17 00:00:00 2001 From: jussi Date: Thu, 21 Nov 2024 23:25:28 +0200 Subject: RL.config and InitWindow. --- examples/raygui_lib/main.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/raygui_lib/main.lua') 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" -- cgit v1.2.3