gui: step

This commit is contained in:
Konstantin8105 2022-11-22 18:08:31 +03:00
parent ce3c8e83dd
commit 806e6560f2
5 changed files with 4661 additions and 0 deletions

View file

@ -0,0 +1,3 @@
module example
go 1.19

View file

@ -0,0 +1,31 @@
package main
import (
"fmt"
rl "github.com/Konstantin8105/raylib"
gui "github.com/Konstantin8105/raygui3.5"
)
func main() {
rl.InitWindow(800, 450, "raylib [physics] example - box2d")
rl.SetTargetFPS(60)
var button bool
for !rl.WindowShouldClose() {
rl.BeginDrawing()
rl.ClearBackground(rl.Black)
button = gui.Button(rl.NewRectangle(50, 150, 100, 40), "Click")
if button {
fmt.Println("Clicked on button")
}
rl.EndDrawing()
}
rl.CloseWindow()
}