mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-09 01:56:47 -05:00
9c2b1dccaf
* more lint fixes for the d2core/d2term * lint fixes for the escape_menu.go * fixed lint issues of credits screen * more lint fixes for the d2gamescreen * lint fixes for the main menu of d2game/d2gamescreen package * lint fixes for the main menu and map engine testing of d2game/d2gamescreen package * more lint fixes for the main menu of d2game/d2gamescreen package * lint fixes for the character select screen of d2game/d2gamescreen package
53 lines
1.7 KiB
Go
53 lines
1.7 KiB
Go
package d2gamescreen
|
|
|
|
import (
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2gui"
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen"
|
|
)
|
|
|
|
type GuiTestMain struct{}
|
|
|
|
func CreateGuiTestMain() *GuiTestMain {
|
|
return &GuiTestMain{}
|
|
}
|
|
|
|
func (g *GuiTestMain) OnLoad(loading d2screen.LoadingState) {
|
|
layout := d2gui.CreateLayout(d2gui.PositionTypeHorizontal)
|
|
|
|
loading.Progress(0.3)
|
|
//
|
|
layoutLeft := layout.AddLayout(d2gui.PositionTypeVertical)
|
|
layoutLeft.SetHorizontalAlign(d2gui.HorizontalAlignCenter)
|
|
layoutLeft.AddLabel("FontStyle16Units", d2gui.FontStyle16Units)
|
|
layoutLeft.AddSpacerStatic(0, 100)
|
|
layoutLeft.AddLabel("FontStyle30Units", d2gui.FontStyle30Units)
|
|
layoutLeft.AddLabel("FontStyle42Units", d2gui.FontStyle42Units)
|
|
layoutLeft.AddLabel("FontStyleFormal10Static", d2gui.FontStyleFormal10Static)
|
|
layoutLeft.AddLabel("FontStyleFormal11Units", d2gui.FontStyleFormal11Units)
|
|
layoutLeft.AddLabel("FontStyleFormal12Static", d2gui.FontStyleFormal12Static)
|
|
loading.Progress(0.6)
|
|
|
|
layout.AddSpacerDynamic()
|
|
|
|
layoutRight := layout.AddLayout(d2gui.PositionTypeVertical)
|
|
layoutRight.SetHorizontalAlign(d2gui.HorizontalAlignRight)
|
|
layoutRight.AddButton("Medium", d2gui.ButtonStyleMedium)
|
|
layoutRight.AddButton("Narrow", d2gui.ButtonStyleNarrow)
|
|
layoutRight.AddButton("OkCancel", d2gui.ButtonStyleOkCancel)
|
|
layoutRight.AddButton("Short", d2gui.ButtonStyleShort)
|
|
layoutRight.AddButton("Wide", d2gui.ButtonStyleWide)
|
|
loading.Progress(0.9)
|
|
|
|
layout.SetVerticalAlign(d2gui.VerticalAlignMiddle)
|
|
d2gui.SetLayout(layout)
|
|
}
|
|
|
|
func (g *GuiTestMain) Render(screen d2interface.Surface) error {
|
|
return nil
|
|
}
|
|
|
|
func (g *GuiTestMain) Advance(tickTime float64) error {
|
|
return nil
|
|
}
|