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.
2023-01-29 06:49:01 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "git.tebibyte.media/sashakoshka/tomo"
|
2023-03-31 03:19:04 +00:00
|
|
|
import "git.tebibyte.media/sashakoshka/tomo/layouts"
|
|
|
|
import "git.tebibyte.media/sashakoshka/tomo/elements"
|
2023-03-16 05:14:39 +00:00
|
|
|
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
|
2023-03-16 18:22:56 +00:00
|
|
|
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
|
2023-01-29 06:49:01 +00:00
|
|
|
|
|
|
|
func main () {
|
|
|
|
tomo.Run(run)
|
|
|
|
}
|
|
|
|
|
|
|
|
func run () {
|
|
|
|
window, _ := tomo.NewWindow(2, 2)
|
|
|
|
window.SetTitle("Switches")
|
|
|
|
|
2023-03-31 03:19:04 +00:00
|
|
|
container := containers.NewContainer(layouts.Vertical { true, true })
|
2023-01-29 06:49:01 +00:00
|
|
|
window.Adopt(container)
|
|
|
|
|
2023-03-31 03:19:04 +00:00
|
|
|
container.Adopt(elements.NewSwitch("hahahah", false), false)
|
|
|
|
container.Adopt(elements.NewSwitch("hehehehheheh", false), false)
|
|
|
|
container.Adopt(elements.NewSwitch("you can flick da swicth", false), false)
|
2023-01-29 06:49:01 +00:00
|
|
|
|
|
|
|
window.OnClose(tomo.Stop)
|
|
|
|
window.Show()
|
|
|
|
}
|