summaryrefslogtreecommitdiff
path: root/examples/raygui_lib/main.lua
diff options
context:
space:
mode:
authorjussi2024-01-10 22:19:00 +0200
committerjussi2024-01-10 22:19:00 +0200
commit7460a16cae15dfa7924d1d4df1aac166a6a6fd2c (patch)
treea028b655e878b4c2ff4b8fb3fb4a27395f5e082f /examples/raygui_lib/main.lua
parent863f596b76043ec374fafa38f14cdc4a97d0b267 (diff)
downloadreilua-enhanced-7460a16cae15dfa7924d1d4df1aac166a6a6fd2c.tar.gz
reilua-enhanced-7460a16cae15dfa7924d1d4df1aac166a6a6fd2c.tar.bz2
reilua-enhanced-7460a16cae15dfa7924d1d4df1aac166a6a6fd2c.zip
Raygui lib extensions property list.
Diffstat (limited to 'examples/raygui_lib/main.lua')
-rw-r--r--examples/raygui_lib/main.lua45
1 files changed, 23 insertions, 22 deletions
diff --git a/examples/raygui_lib/main.lua b/examples/raygui_lib/main.lua
index 1f20d7b..0bb01fb 100644
--- a/examples/raygui_lib/main.lua
+++ b/examples/raygui_lib/main.lua
@@ -68,13 +68,13 @@ function RL.init()
local button = Gui:Button(
Rect:new( 245, 188, 64, 32 ),
"Dog",
- function() toggleGroup:setText( "Dog;Cat\nEagle" ) end
+ function() toggleGroup:setText( "Dog;Cat\nEagle" ) end,
+ {
+ { RL.DEFAULT, RL.TEXT_COLOR_NORMAL, RL.ColorToInt( RL.RED ) },
+ { RL.DEFAULT, RL.TEXT_COLOR_FOCUSED, RL.ColorToInt( RL.ORANGE ) },
+ { RL.DEFAULT, RL.TEXT_COLOR_PRESSED, RL.ColorToInt( RL.GREEN ) },
+ }
)
- button.styles = {
- { RL.DEFAULT, RL.TEXT_COLOR_NORMAL, RL.ColorToInt( RL.RED ) },
- { RL.DEFAULT, RL.TEXT_COLOR_FOCUSED, RL.ColorToInt( RL.ORANGE ) },
- { RL.DEFAULT, RL.TEXT_COLOR_PRESSED, RL.ColorToInt( RL.GREEN ) },
- }
button.texture = texture
button.textureRect = textureRect
local checkbox = Gui:CheckBox(
@@ -183,11 +183,11 @@ function RL.init()
function( self ) self.visible = false end,
-- Grab callback.
function( self ) Gui:set2Top( self ) end,
- nil
+ nil,
+ {
+ { RL.DEFAULT, RL.TEXT_COLOR_NORMAL, RL.ColorToInt( RL.RED ) },
+ }
)
- windowbox.styles = {
- { RL.DEFAULT, RL.TEXT_COLOR_NORMAL, RL.ColorToInt( RL.RED ) },
- }
windowbox.texture = texture
windowbox.textureRect = textureRect
@@ -203,13 +203,14 @@ function RL.init()
Rect:new( 400, 64, 256, 128 ),
"Panel",
-- Grab callback.
- function( self ) Gui:set2Top( self ) end
+ function( self ) Gui:set2Top( self ) end,
+ nil,
+ {
+ { RL.DEFAULT, RL.TEXT_COLOR_NORMAL, RL.ColorToInt( RL.MAGENTA ) },
+ { RL.DEFAULT, RL.TEXT_ALIGNMENT, RL.TEXT_ALIGN_CENTER },
+ { RL.DEFAULT, RL.BACKGROUND_COLOR, RL.ColorToInt( RL.DARKBLUE ) },
+ }
)
- panel.styles = {
- { RL.DEFAULT, RL.TEXT_COLOR_NORMAL, RL.ColorToInt( RL.MAGENTA ) },
- { RL.DEFAULT, RL.TEXT_ALIGNMENT, RL.TEXT_ALIGN_CENTER },
- { RL.DEFAULT, RL.BACKGROUND_COLOR, RL.ColorToInt( RL.DARKBLUE ) },
- }
tabBar = Gui:GuiTabBar(
Rect:new( 700, 520, 700, 32 ),
"Cat;Dog;Horse;Cow;Dog;Horse;Cow",
@@ -240,13 +241,13 @@ function RL.init()
0,
0,
0,
- function( self ) print( self:getItem( self.active ) ) end
+ function( self ) print( self:getItem( self.active ) ) end,
+ {
+ { RL.DEFAULT, RL.TEXT_COLOR_NORMAL, RL.ColorToInt( RL.RED ) },
+ { RL.DEFAULT, RL.TEXT_COLOR_FOCUSED, RL.ColorToInt( RL.ORANGE ) },
+ { RL.DEFAULT, RL.TEXT_COLOR_PRESSED, RL.ColorToInt( RL.GREEN ) },
+ }
)
- listviewex.styles = {
- { RL.DEFAULT, RL.TEXT_COLOR_NORMAL, RL.ColorToInt( RL.RED ) },
- { RL.DEFAULT, RL.TEXT_COLOR_FOCUSED, RL.ColorToInt( RL.ORANGE ) },
- { RL.DEFAULT, RL.TEXT_COLOR_PRESSED, RL.ColorToInt( RL.GREEN ) },
- }
listviewex.texture = texture
listviewex.textureRect = textureRect
local messagebox = Gui:MessageBox(