Got a bunch of examples working
This commit is contained in:
@@ -3,7 +3,6 @@ package main
|
||||
import "fmt"
|
||||
import "image"
|
||||
import "git.tebibyte.media/sashakoshka/tomo"
|
||||
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"
|
||||
@@ -16,7 +15,7 @@ func run () {
|
||||
window, _ := tomo.NewWindow(tomo.Bounds(200, 200, 256, 256))
|
||||
window.SetTitle("Main")
|
||||
|
||||
container := containers.NewContainer(layouts.Vertical { true, true })
|
||||
container := containers.NewVBox(true, true)
|
||||
container.Adopt(elements.NewLabel("Main window", false), true)
|
||||
window.Adopt(container)
|
||||
|
||||
@@ -33,7 +32,7 @@ func createPanel (parent tomo.MainWindow, id int, bounds image.Rectangle) {
|
||||
window, _ := parent.NewPanel(bounds)
|
||||
title := fmt.Sprint("Panel #", id)
|
||||
window.SetTitle(title)
|
||||
container := containers.NewContainer(layouts.Vertical { true, true })
|
||||
container := containers.NewVBox(true, true)
|
||||
container.Adopt(elements.NewLabel(title, false), true)
|
||||
window.Adopt(container)
|
||||
window.Show()
|
||||
|
||||
Reference in New Issue
Block a user