This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
tomo-old/examples/switch/main.go

26 lines
691 B
Go
Raw Normal View History

package main
import "git.tebibyte.media/sashakoshka/tomo"
2023-03-30 21:19:04 -06:00
import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
func main () {
tomo.Run(run)
}
func run () {
window, _ := tomo.NewWindow(tomo.Bounds(0, 0, 0, 0))
window.SetTitle("Switches")
2023-04-18 14:18:30 -06:00
container := elements.NewVBox(elements.SpaceBoth)
window.Adopt(container)
2023-04-18 14:18:30 -06:00
container.Adopt(elements.NewSwitch("hahahah", false))
container.Adopt(elements.NewSwitch("hehehehheheh", false))
container.Adopt(elements.NewSwitch("you can flick da swicth", false))
2023-04-20 16:40:05 -06:00
container.Adopt(elements.NewToggleButton("like a switch, but not", false))
window.OnClose(tomo.Stop)
window.Show()
}