chore(ui): add placeholder content for remaining tabs
This commit is contained in:
parent
3cb0cc61d0
commit
ccbd906c6f
BIN
frontend/ambition
Executable file
BIN
frontend/ambition
Executable file
Binary file not shown.
|
@ -72,6 +72,7 @@ func uiInit(width, height int) UI {
|
||||||
headingFace, _ := makeFace(18, fonts.IosevkaBold_ttf)
|
headingFace, _ := makeFace(18, fonts.IosevkaBold_ttf)
|
||||||
defaultFace, _ := makeFace(14, fonts.IosevkaRegular_ttf)
|
defaultFace, _ := makeFace(14, fonts.IosevkaRegular_ttf)
|
||||||
|
|
||||||
|
// Create the 'Profile' tab
|
||||||
tabProfile := widget.NewTabBookTab("Profile",
|
tabProfile := widget.NewTabBookTab("Profile",
|
||||||
widget.ContainerOpts.BackgroundImage(image.NewNineSliceColor(ui.colors["gray"])),
|
widget.ContainerOpts.BackgroundImage(image.NewNineSliceColor(ui.colors["gray"])),
|
||||||
widget.ContainerOpts.Layout(widget.NewGridLayout(
|
widget.ContainerOpts.Layout(widget.NewGridLayout(
|
||||||
|
@ -85,14 +86,16 @@ func uiInit(width, height int) UI {
|
||||||
widget.GridLayoutOpts.Padding(widget.NewInsetsSimple(20)),
|
widget.GridLayoutOpts.Padding(widget.NewInsetsSimple(20)),
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
|
// Add the player stats as content for the 'profile' tab
|
||||||
makeStatsBars(tabProfile, ui, defaultFace)
|
makeStatsBars(tabProfile, ui, defaultFace)
|
||||||
|
|
||||||
|
// Create the 'Inventory' tab
|
||||||
tabInventory := widget.NewTabBookTab("Inventory",
|
tabInventory := widget.NewTabBookTab("Inventory",
|
||||||
widget.ContainerOpts.BackgroundImage(image.NewNineSliceColor(color.NRGBA{0, 255, 0, 0xff})),
|
widget.ContainerOpts.BackgroundImage(image.NewNineSliceColor(ui.colors["gray"])),
|
||||||
widget.ContainerOpts.Layout(widget.NewAnchorLayout()),
|
widget.ContainerOpts.Layout(widget.NewAnchorLayout()),
|
||||||
)
|
)
|
||||||
inventoryButton := widget.NewText(
|
inventoryButton := widget.NewText(
|
||||||
widget.TextOpts.Text("Inventory content", headingFace, color.Black),
|
widget.TextOpts.Text("Placeholder", headingFace, ui.colors["white"]),
|
||||||
widget.TextOpts.Position(widget.TextPositionCenter, widget.TextPositionCenter),
|
widget.TextOpts.Position(widget.TextPositionCenter, widget.TextPositionCenter),
|
||||||
widget.TextOpts.WidgetOpts(widget.WidgetOpts.LayoutData(widget.AnchorLayoutData{
|
widget.TextOpts.WidgetOpts(widget.WidgetOpts.LayoutData(widget.AnchorLayoutData{
|
||||||
HorizontalPosition: widget.AnchorLayoutPositionCenter,
|
HorizontalPosition: widget.AnchorLayoutPositionCenter,
|
||||||
|
@ -101,12 +104,13 @@ func uiInit(width, height int) UI {
|
||||||
)
|
)
|
||||||
tabInventory.AddChild(inventoryButton)
|
tabInventory.AddChild(inventoryButton)
|
||||||
|
|
||||||
|
// Create the 'Other' tab
|
||||||
tabOther := widget.NewTabBookTab("Other",
|
tabOther := widget.NewTabBookTab("Other",
|
||||||
widget.ContainerOpts.BackgroundImage(image.NewNineSliceColor(color.NRGBA{0, 255, 0, 0xff})),
|
widget.ContainerOpts.BackgroundImage(image.NewNineSliceColor(ui.colors["gray"])),
|
||||||
widget.ContainerOpts.Layout(widget.NewAnchorLayout()),
|
widget.ContainerOpts.Layout(widget.NewAnchorLayout()),
|
||||||
)
|
)
|
||||||
otherButton := widget.NewText(
|
otherButton := widget.NewText(
|
||||||
widget.TextOpts.Text("Other content", headingFace, color.Black),
|
widget.TextOpts.Text("Placeholder", headingFace, ui.colors["white"]),
|
||||||
widget.TextOpts.Position(widget.TextPositionCenter, widget.TextPositionCenter),
|
widget.TextOpts.Position(widget.TextPositionCenter, widget.TextPositionCenter),
|
||||||
widget.TextOpts.WidgetOpts(widget.WidgetOpts.LayoutData(widget.AnchorLayoutData{
|
widget.TextOpts.WidgetOpts(widget.WidgetOpts.LayoutData(widget.AnchorLayoutData{
|
||||||
HorizontalPosition: widget.AnchorLayoutPositionCenter,
|
HorizontalPosition: widget.AnchorLayoutPositionCenter,
|
||||||
|
|
Reference in a new issue