[raygui] LoadIcons-, DrawIcon-function and example added

This commit is contained in:
JupiterRider 2024-05-22 18:51:38 +02:00
parent 6c4349fd5c
commit d86638ae10
5 changed files with 36 additions and 0 deletions

View 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.
![Screenshot](./screenshot.png)

Binary file not shown.

View 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()
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB