Re-organized module structure
This commit is contained in:
@@ -2,8 +2,8 @@ package main
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/tomo"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/popups"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/layouts/basic"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/layouts"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/elements"
|
||||
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
|
||||
|
||||
@@ -15,12 +15,12 @@ func run () {
|
||||
window, _ := tomo.NewWindow(2, 2)
|
||||
window.SetTitle("Dialog Boxes")
|
||||
|
||||
container := containers.NewContainer(basicLayouts.Vertical { true, true })
|
||||
container := containers.NewContainer(layouts.Vertical { true, true })
|
||||
window.Adopt(container)
|
||||
|
||||
container.Adopt(basicElements.NewLabel("Try out different dialogs:", false), true)
|
||||
container.Adopt(elements.NewLabel("Try out different dialogs:", false), true)
|
||||
|
||||
infoButton := basicElements.NewButton("popups.DialogKindInfo")
|
||||
infoButton := elements.NewButton("popups.DialogKindInfo")
|
||||
infoButton.OnClick (func () {
|
||||
popups.NewDialog (
|
||||
popups.DialogKindInfo,
|
||||
@@ -31,7 +31,7 @@ func run () {
|
||||
container.Adopt(infoButton, false)
|
||||
infoButton.Focus()
|
||||
|
||||
questionButton := basicElements.NewButton("popups.DialogKindQuestion")
|
||||
questionButton := elements.NewButton("popups.DialogKindQuestion")
|
||||
questionButton.OnClick (func () {
|
||||
popups.NewDialog (
|
||||
popups.DialogKindQuestion,
|
||||
@@ -44,7 +44,7 @@ func run () {
|
||||
})
|
||||
container.Adopt(questionButton, false)
|
||||
|
||||
warningButton := basicElements.NewButton("popups.DialogKindWarning")
|
||||
warningButton := elements.NewButton("popups.DialogKindWarning")
|
||||
warningButton.OnClick (func () {
|
||||
popups.NewDialog (
|
||||
popups.DialogKindWarning,
|
||||
@@ -54,7 +54,7 @@ func run () {
|
||||
})
|
||||
container.Adopt(warningButton, false)
|
||||
|
||||
errorButton := basicElements.NewButton("popups.DialogKindError")
|
||||
errorButton := elements.NewButton("popups.DialogKindError")
|
||||
errorButton.OnClick (func () {
|
||||
popups.NewDialog (
|
||||
popups.DialogKindError,
|
||||
@@ -64,7 +64,7 @@ func run () {
|
||||
})
|
||||
container.Adopt(errorButton, false)
|
||||
|
||||
cancelButton := basicElements.NewButton("No thank you.")
|
||||
cancelButton := elements.NewButton("No thank you.")
|
||||
cancelButton.OnClick(tomo.Stop)
|
||||
container.Adopt(cancelButton, false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user