From 449873f6b8cfec276ffe9c4d9f18a46ac4c0344c Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Tue, 31 Dec 2019 11:27:55 +0100 Subject: [PATCH] Added title on main menu. Changed "Apply" button into "OK" (settings menu). --- cmd/krampus19/changesettings.go | 2 +- cmd/krampus19/mainmenu.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/krampus19/changesettings.go b/cmd/krampus19/changesettings.go index 8ce7cb2..4c5dd4e 100644 --- a/cmd/krampus19/changesettings.go +++ b/cmd/krampus19/changesettings.go @@ -281,7 +281,7 @@ func (s *changeSettings) Enter(ctx *Context) error { buttons := &alui.StackPanel{Orientation: alui.OrientationHorizontal} buttons.AddChild( newWideButton("Cancel", func() { s.ctx.Navigation.ShowMainMenu() }), - newWideButton("Apply", func() { + newWideButton("OK", func() { var controls = controls{MoveLeft: keyLeft.Key, MoveUp: keyUp.Key, MoveRight: keyRight.Key, MoveDown: keyDown.Key} var video = video{Windowed: windowed.Selected, DisplayMode: displayMode.Mode()} s.ctx.Settings = settings{Controls: controls, Video: video} diff --git a/cmd/krampus19/mainmenu.go b/cmd/krampus19/mainmenu.go index 17abd51..bf5d3b5 100644 --- a/cmd/krampus19/mainmenu.go +++ b/cmd/krampus19/mainmenu.go @@ -1,6 +1,7 @@ package main import ( + "opslag.de/schobers/allg5" "opslag.de/schobers/krampus19/alui" ) @@ -13,6 +14,7 @@ type mainMenu struct { func (m *mainMenu) Enter(ctx *Context) error { m.ctx = ctx m.Init() + m.AddChild(alui.NewMargins(&alui.Label{ControlBase: alui.ControlBase{Font: "header"}, Text: "Sokodragon", TextAlign: allg5.AlignCenter}, 3*margin)) m.Add("Play", func() { m.ctx.Navigation.SelectLevel("1") }) m.Add("Settings", func() { m.ctx.Navigation.ChangeSettings() }) m.Add("Quit", func() { m.ctx.Navigation.Quit() })