Added title on main menu.
Changed "Apply" button into "OK" (settings menu).
This commit is contained in:
parent
4b393610e2
commit
449873f6b8
@ -281,7 +281,7 @@ func (s *changeSettings) Enter(ctx *Context) error {
|
|||||||
buttons := &alui.StackPanel{Orientation: alui.OrientationHorizontal}
|
buttons := &alui.StackPanel{Orientation: alui.OrientationHorizontal}
|
||||||
buttons.AddChild(
|
buttons.AddChild(
|
||||||
newWideButton("Cancel", func() { s.ctx.Navigation.ShowMainMenu() }),
|
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 controls = controls{MoveLeft: keyLeft.Key, MoveUp: keyUp.Key, MoveRight: keyRight.Key, MoveDown: keyDown.Key}
|
||||||
var video = video{Windowed: windowed.Selected, DisplayMode: displayMode.Mode()}
|
var video = video{Windowed: windowed.Selected, DisplayMode: displayMode.Mode()}
|
||||||
s.ctx.Settings = settings{Controls: controls, Video: video}
|
s.ctx.Settings = settings{Controls: controls, Video: video}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"opslag.de/schobers/allg5"
|
||||||
"opslag.de/schobers/krampus19/alui"
|
"opslag.de/schobers/krampus19/alui"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ type mainMenu struct {
|
|||||||
func (m *mainMenu) Enter(ctx *Context) error {
|
func (m *mainMenu) Enter(ctx *Context) error {
|
||||||
m.ctx = ctx
|
m.ctx = ctx
|
||||||
m.Init()
|
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("Play", func() { m.ctx.Navigation.SelectLevel("1") })
|
||||||
m.Add("Settings", func() { m.ctx.Navigation.ChangeSettings() })
|
m.Add("Settings", func() { m.ctx.Navigation.ChangeSettings() })
|
||||||
m.Add("Quit", func() { m.ctx.Navigation.Quit() })
|
m.Add("Quit", func() { m.ctx.Navigation.Quit() })
|
||||||
|
Loading…
Reference in New Issue
Block a user