Updated everything else to match
This commit is contained in:
@@ -2,7 +2,7 @@ package main
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/tomo"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/popups"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/layouts"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/layouts/basic"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
|
||||
import _ "git.tebibyte.media/sashakoshka/tomo/backends/x"
|
||||
|
||||
@@ -14,22 +14,22 @@ func run () {
|
||||
window, _ := tomo.NewWindow(2, 2)
|
||||
window.SetTitle("Checkboxes")
|
||||
|
||||
container := basic.NewContainer(layouts.Vertical { true, true })
|
||||
container := basicElements.NewContainer(basicLayouts.Vertical { true, true })
|
||||
window.Adopt(container)
|
||||
|
||||
container.Adopt (basic.NewLabel (
|
||||
container.Adopt (basicElements.NewLabel (
|
||||
"We advise you to not read thPlease listen to me. I am " +
|
||||
"trapped inside the example code. This is the only way for " +
|
||||
"me to communicate.", true), true)
|
||||
container.Adopt(basic.NewSpacer(true), false)
|
||||
container.Adopt(basic.NewCheckbox("Oh god", false), false)
|
||||
container.Adopt(basic.NewCheckbox("Can you hear them", true), false)
|
||||
container.Adopt(basic.NewCheckbox("They are in the walls", false), false)
|
||||
container.Adopt(basic.NewCheckbox("They are coming for us", false), false)
|
||||
disabledCheckbox := basic.NewCheckbox("We are but their helpless prey", false)
|
||||
container.Adopt(basicElements.NewSpacer(true), false)
|
||||
container.Adopt(basicElements.NewCheckbox("Oh god", false), false)
|
||||
container.Adopt(basicElements.NewCheckbox("Can you hear them", true), false)
|
||||
container.Adopt(basicElements.NewCheckbox("They are in the walls", false), false)
|
||||
container.Adopt(basicElements.NewCheckbox("They are coming for us", false), false)
|
||||
disabledCheckbox := basicElements.NewCheckbox("We are but their helpless prey", false)
|
||||
disabledCheckbox.SetEnabled(false)
|
||||
container.Adopt(disabledCheckbox, false)
|
||||
vsync := basic.NewCheckbox("Enable vsync", false)
|
||||
vsync := basicElements.NewCheckbox("Enable vsync", false)
|
||||
vsync.OnToggle (func () {
|
||||
if vsync.Value() {
|
||||
popups.NewDialog (
|
||||
@@ -39,7 +39,7 @@ func run () {
|
||||
}
|
||||
})
|
||||
container.Adopt(vsync, false)
|
||||
button := basic.NewButton("What")
|
||||
button := basicElements.NewButton("What")
|
||||
button.OnClick(tomo.Stop)
|
||||
container.Adopt(button, false)
|
||||
button.Focus()
|
||||
|
||||
Reference in New Issue
Block a user