This commit is contained in:
Konstantin8105 2022-11-22 18:41:59 +03:00
parent 2f5d911417
commit b87c8653e5
2 changed files with 32 additions and 0 deletions

30
examples/main.go Normal file
View file

@ -0,0 +1,30 @@
package main
import (
"fmt"
rl "github.com/Konstantin8105/raylib-go/raylib"
)
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 = rl.Button(rl.NewRectangle(50, 150, 100, 40), "Click")
if button {
fmt.Println("Clicked on button")
}
rl.EndDrawing()
}
rl.CloseWindow()
}