step
This commit is contained in:
parent
b87c8653e5
commit
0bec81c656
2 changed files with 10 additions and 33 deletions
|
@ -1,5 +1,12 @@
|
|||
module example
|
||||
module examples
|
||||
|
||||
go 1.19
|
||||
go 1.16
|
||||
|
||||
require github.com/Konstantin8105/raylib-go/raylib v0.0.0-20221122153952-2f5d9114177b // indirect
|
||||
require (
|
||||
github.com/gen2brain/raylib-go/easings v0.0.0-20220827153754-6e090424c541
|
||||
github.com/gen2brain/raylib-go/physics v0.0.0-20220827153754-6e090424c541
|
||||
github.com/gen2brain/raylib-go/raygui v0.0.0-20220827153754-6e090424c541
|
||||
github.com/gen2brain/raylib-go/raylib v0.0.0-20220827153754-6e090424c541
|
||||
github.com/jakecoffman/cp v1.2.1
|
||||
github.com/neguse/go-box2d-lite v0.0.0-20170921151050-5d8ed9b7272b
|
||||
)
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
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()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue