Moved containers into a separate package

This commit is contained in:
Sasha Koshka
2023-03-16 14:22:56 -04:00
parent c55925d152
commit a4ef28cdd0
22 changed files with 65 additions and 45 deletions

View File

@@ -8,6 +8,7 @@ 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/backends/all"
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
//go:embed wall.png
var wallTextureBytes []uint8
@@ -20,7 +21,7 @@ func run () {
window, _ := tomo.NewWindow(640, 480)
window.SetTitle("Raycaster")
container := basicElements.NewContainer(basicLayouts.Vertical { false, false })
container := containers.NewContainer(basicLayouts.Vertical { false, false })
window.Adopt(container)
wallTexture, _ := TextureFrom(bytes.NewReader(wallTextureBytes))
@@ -47,7 +48,7 @@ func run () {
wallTexture,
})
topBar := basicElements.NewContainer(basicLayouts.Horizontal { true, true })
topBar := containers.NewContainer(basicLayouts.Horizontal { true, true })
staminaBar := basicElements.NewProgressBar(game.Stamina())
healthBar := basicElements.NewProgressBar(game.Health())