[raygui] LoadIcons-, DrawIcon-function and example added
This commit is contained in:
parent
6c4349fd5c
commit
d86638ae10
5 changed files with 36 additions and 0 deletions
3
examples/gui/icons/README.md
Normal file
3
examples/gui/icons/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
This example loads a custom .rgi-file and draws the 255th icon. You can use the [rGuiIcons](https://raylibtech.itch.io/rguiicons) tool to view or create icon files.
|
||||
|
||||

|
BIN
examples/gui/icons/default_icons_with_255.rgi
Normal file
BIN
examples/gui/icons/default_icons_with_255.rgi
Normal file
Binary file not shown.
20
examples/gui/icons/main.go
Normal file
20
examples/gui/icons/main.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/gen2brain/raylib-go/raygui"
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rl.InitWindow(800, 600, "raylib-go - icons example")
|
||||
defer rl.CloseWindow()
|
||||
|
||||
raygui.LoadIcons("default_icons_with_255.rgi", false)
|
||||
|
||||
for !rl.WindowShouldClose() {
|
||||
rl.BeginDrawing()
|
||||
rl.ClearBackground(rl.RayWhite)
|
||||
raygui.DrawIcon(raygui.ICON_255, 100, 100, 8, rl.Gray)
|
||||
rl.EndDrawing()
|
||||
}
|
||||
}
|
BIN
examples/gui/icons/screenshot.png
Normal file
BIN
examples/gui/icons/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8 KiB |
Loading…
Add table
Add a link
Reference in a new issue