added select and popup screens

This commit is contained in:
2024-02-18 18:19:34 +01:00
parent 4c9ab36fa1
commit e12af87fb7
13 changed files with 379 additions and 55 deletions

View File

@@ -52,14 +52,24 @@ func (container *RowContainer) Container() *widget.Container {
return container.Root
}
func NewRowContainer() *RowContainer {
// set arg to false if no background needed
func NewRowContainer(setbackground ...bool) *RowContainer {
background := assets.Assets["background-lila"]
var uiContainer *widget.Container
uiContainer := widget.NewContainer(
widget.ContainerOpts.BackgroundImage(
image.NewNineSlice(background, [3]int{0, 1, 639}, [3]int{0, 1, 479})),
widget.ContainerOpts.Layout(widget.NewAnchorLayout()),
)
if len(setbackground) > 0 {
// false
uiContainer = widget.NewContainer(
widget.ContainerOpts.Layout(widget.NewAnchorLayout()),
)
} else {
// default: true
uiContainer = widget.NewContainer(
widget.ContainerOpts.BackgroundImage(
image.NewNineSlice(background, [3]int{0, 1, 639}, [3]int{0, 1, 479})),
widget.ContainerOpts.Layout(widget.NewAnchorLayout()),
)
}
rowContainer := widget.NewContainer(
widget.ContainerOpts.WidgetOpts(