Skip to content

Instantly share code, notes, and snippets.

@hfabre
Created October 11, 2020 10:57
Show Gist options
  • Save hfabre/0afe041ac8e927d0147956a09ad25e86 to your computer and use it in GitHub Desktop.
Save hfabre/0afe041ac8e927d0147956a09ad25e86 to your computer and use it in GitHub Desktop.
Demo sqweek gtk3 bug
package main
import (
"github.com/sqweek/dialog"
r "github.com/lachee/raylib-goplus/raylib"
)
func main() {
path := ""
// Note: Uncomment this to get around the bug
//path, _ = dialog.File().Load()
r.InitWindow(800, 600, "Demo bug gtk")
for !r.WindowShouldClose() {
r.BeginDrawing()
r.ClearBackground(r.RayWhite)
if (r.GuiButton(r.Rectangle{X: 10, Y: 10, Width: 75, Height: 25}, "Select file")) {
path, _ = dialog.File().Load()
println(path)
}
r.EndDrawing()
}
r.CloseWindow()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment