Ok it kind of works now

This commit is contained in:
2023-04-10 16:47:03 -04:00
parent da47026d1c
commit 2987331a31
3 changed files with 26 additions and 6 deletions

View File

@@ -65,6 +65,17 @@ func run () {
})
container.Adopt(errorButton, false)
menuButton := elements.NewButton("menu")
menuButton.OnClick (func () {
menu, err := window.NewMenu (
tomo.Bounds(0, 0, 64, 64).
Add(menuButton.Bounds().Min))
if err != nil { println(err.Error()) }
menu.Adopt(elements.NewLabel("I'm a shy window...", true))
menu.Show()
})
container.Adopt(menuButton, false)
cancelButton := elements.NewButton("No thank you.")
cancelButton.OnClick(tomo.Stop)
container.Adopt(cancelButton, false)