Gui Icons enumeration.

This commit is contained in:
jussi
2024-12-11 00:21:28 +02:00
parent 14fbd73660
commit b4b81f68c4
10 changed files with 1343 additions and 18 deletions

View File

@@ -44,11 +44,11 @@ function RL.draw()
local result = 0
-- RL.GuiSetStyle( RL.DEFAULT, RL.TEXT_SIZE, 10 )
if RL.GuiButton( { 112, 16, 96, 32 }, RL.GuiIconText( 113, "Exit" ) ) == 1 then
if RL.GuiButton( { 112, 16, 96, 32 }, RL.GuiIconText( RL.ICON_CROSS, "Exit" ) ) == 1 then
RL.CloseWindow()
end
RL.GuiButton( { 112, 64, 96, 32 }, RL.GuiIconText( 100, "Cat" ) )
RL.GuiButton( { 112, 64, 96, 32 }, RL.GuiIconText( RL.ICON_FOUR_BOXES, "Cat" ) )
if windowOpen and RL.GuiWindowBox( { 300, 16, 200, 320 }, "Window" ) == 1 then
windowOpen = false
@@ -117,7 +117,7 @@ function RL.draw()
_, guiTabBarActive = RL.GuiTabBar(
{ 420, 680, 320, 32 },
RL.GuiIconText( 13, "Play" )..";"..RL.GuiIconText( 12, "Cat.png" )..";"..RL.GuiIconText( 16, "Files" ),
RL.GuiIconText( RL.ICON_FILETYPE_PLAY, "Play" )..";"..RL.GuiIconText( RL.ICON_FILETYPE_IMAGE, "Cat.png" )..";"..RL.GuiIconText( RL.ICON_FILE_COPY, "Files" ),
guiTabBarActive
)

View File

@@ -81,7 +81,7 @@ function FileBrowser:new( pos )
-- Back button.
object.backButton = Gui:Button(
Rect:new( 0, 0, iconButtonSize.x, iconButtonSize.y ),
RL.GuiIconText( 118, "" ),
RL.GuiIconText( RL.ICON_ARROW_LEFT_FILL, "" ),
{ -- callbacks.
pressed = function() object:back() end
}
@@ -94,7 +94,7 @@ function FileBrowser:new( pos )
-- Search button.
object.searchToggle = Gui:Toggle(
Rect:new( 0, 0, iconButtonSize.x, iconButtonSize.y ),
RL.GuiIconText( 42, "" ),
RL.GuiIconText( RL.ICON_LENS, "" ),
false, -- active.
{ -- callbacks.
pressed = function( this ) object:searchPressed( this.active ) end

View File

@@ -286,15 +286,15 @@ local function addTreeView()
)
-- Items.
local folder = TreeView:addItem( RL.GuiIconText( 1, "Images" ) )
local folderEmpty = TreeView:addItem( RL.GuiIconText( 1, "Empty Folder" ) )
local folder2 = TreeView:addItem( RL.GuiIconText( 1, "More images" ), folder )
TreeView:addItem( RL.GuiIconText( 12, "Cat.png" ), folder )
TreeView:addItem( RL.GuiIconText( 12, "Dog.png" ), folder2 )
TreeView:addItem( RL.GuiIconText( 12, "Horse.png" ), folder2 )
local folder = TreeView:addItem( RL.GuiIconText( RL.ICON_FOLDER_FILE_OPEN, "Images" ) )
local folderEmpty = TreeView:addItem( RL.GuiIconText( RL.ICON_FOLDER_FILE_OPEN, "Empty Folder" ) )
local folder2 = TreeView:addItem( RL.GuiIconText( RL.ICON_FOLDER_FILE_OPEN, "More images" ), folder )
TreeView:addItem( RL.GuiIconText( RL.ICON_FILETYPE_IMAGE, "Cat.png" ), folder )
TreeView:addItem( RL.GuiIconText( RL.ICON_FILETYPE_IMAGE, "Dog.png" ), folder2 )
TreeView:addItem( RL.GuiIconText( RL.ICON_FILETYPE_IMAGE, "Horse.png" ), folder2 )
for i = 0, 10 do
TreeView:addItem( RL.GuiIconText( 12, "Duck"..i..".png" ), folder2 )
TreeView:addItem( RL.GuiIconText( RL.ICON_FILETYPE_IMAGE, "Duck"..i..".png" ), folder2 )
end
end

View File

@@ -48,9 +48,9 @@ end
local function setGroupText( text, active )
if active then
return RL.GuiIconText( 120, text )
return RL.GuiIconText( RL.ICON_ARROW_DOWN_FILL, text )
else
return RL.GuiIconText( 119, text )
return RL.GuiIconText( RL.ICON_ARROW_RIGHT_FILL, text )
end
end

View File

@@ -35,9 +35,9 @@ end
function TreeItem:setOpenIcon()
if self.open then
return RL.GuiIconText( 120, "" )
return RL.GuiIconText( RL.ICON_ARROW_DOWN_FILL, "" )
else
return RL.GuiIconText( 119, "" )
return RL.GuiIconText( RL.ICON_ARROW_RIGHT_FILL, "" )
end
end