aboutsummaryrefslogtreecommitdiff
path: root/go/client/startMenu.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/client/startMenu.go')
-rw-r--r--go/client/startMenu.go23
1 files changed, 11 insertions, 12 deletions
diff --git a/go/client/startMenu.go b/go/client/startMenu.go
index 29a4a18c..94ec3aef 100644
--- a/go/client/startMenu.go
+++ b/go/client/startMenu.go
@@ -17,8 +17,7 @@ const (
type StartMenu struct {
ui.Collection
- app *app
- width, height int
+ app *app
deckInput *ui.TextInput
@@ -36,8 +35,8 @@ func NewStartMenu(app *app) *StartMenu {
func (m *StartMenu) build() {
deckInput := ui.NewTextInput(
- (m.width-DECK_LIST_WIDTH)/2,
- (m.height-DECK_LIST_HEIGHT)/2,
+ (m.Width-DECK_LIST_WIDTH)/2,
+ (m.Height-DECK_LIST_HEIGHT)/2,
DECK_LIST_WIDTH,
DECK_LIST_HEIGHT,
"deck",
@@ -52,7 +51,7 @@ func (m *StartMenu) build() {
m.AddWidget(deckInput)
m.AddWidget(ui.NewFixedTextBox(
- (m.width-START_BUTTON_WIDTH)/2-START_BUTTON_WIDTH,
+ (m.Width-START_BUTTON_WIDTH)/2-START_BUTTON_WIDTH,
deckInput.Y-START_BUTTON_HEIGHT,
START_BUTTON_WIDTH,
START_BUTTON_HEIGHT,
@@ -60,7 +59,7 @@ func (m *StartMenu) build() {
).Centering(true))
mapInput := ui.NewTextInput(
- (m.width-START_BUTTON_WIDTH)/2,
+ (m.Width-START_BUTTON_WIDTH)/2,
deckInput.Y-START_BUTTON_HEIGHT,
START_BUTTON_WIDTH,
START_BUTTON_HEIGHT,
@@ -74,7 +73,7 @@ func (m *StartMenu) build() {
m.AddWidget(mapInput)
m.AddWidget(ui.NewFixedTextBox(
- (m.width-START_BUTTON_WIDTH)/2-START_BUTTON_WIDTH,
+ (m.Width-START_BUTTON_WIDTH)/2-START_BUTTON_WIDTH,
mapInput.Y-START_BUTTON_HEIGHT,
START_BUTTON_WIDTH,
START_BUTTON_HEIGHT,
@@ -82,7 +81,7 @@ func (m *StartMenu) build() {
).Centering(true))
playerInput := ui.NewTextInput(
- (m.width-START_BUTTON_WIDTH)/2,
+ (m.Width-START_BUTTON_WIDTH)/2,
mapInput.Y-START_BUTTON_HEIGHT,
START_BUTTON_WIDTH,
START_BUTTON_HEIGHT,
@@ -96,18 +95,18 @@ func (m *StartMenu) build() {
m.AddWidget(playerInput)
m.AddWidget(ui.NewSimpleButton(
- (m.width-START_BUTTON_WIDTH)/2+START_BUTTON_WIDTH/2,
+ (m.Width-START_BUTTON_WIDTH)/2+START_BUTTON_WIDTH/2,
deckInput.Y+deckInput.Height,
START_BUTTON_WIDTH,
START_BUTTON_HEIGHT,
"Sealed",
func(*ui.SimpleButton) {
- sealed := NewSealed(m.width, m.height, m.app)
+ sealed := NewSealed(m.Width, m.Height, m.app)
m.app.pushActivity(sealed)
}))
m.AddWidget(ui.NewSimpleButton(
- (m.width-START_BUTTON_WIDTH)/2-START_BUTTON_WIDTH/2,
+ (m.Width-START_BUTTON_WIDTH)/2-START_BUTTON_WIDTH/2,
deckInput.Y+deckInput.Height,
START_BUTTON_WIDTH,
START_BUTTON_HEIGHT,
@@ -129,7 +128,7 @@ func (m *StartMenu) Update() error {
}
func (m *StartMenu) Layout(width, height int) (int, int) {
- return m.width, m.height
+ return m.Width, m.Height
}
func (m *StartMenu) startGame() {