Escape will go back to main menu in the level selection menu.
This commit is contained in:
parent
449873f6b8
commit
c61f074465
@ -3,6 +3,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"opslag.de/schobers/allg5"
|
||||||
|
|
||||||
"opslag.de/schobers/krampus19/alui"
|
"opslag.de/schobers/krampus19/alui"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -35,4 +37,14 @@ func (s *levelSelect) Enter(ctx *Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *levelSelect) Handle(e allg5.Event) {
|
||||||
|
switch e := e.(type) {
|
||||||
|
case *allg5.KeyDownEvent:
|
||||||
|
switch e.KeyCode {
|
||||||
|
case allg5.KeyEscape:
|
||||||
|
s.ctx.Navigation.ShowMainMenu()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (s *levelSelect) Leave() {}
|
func (s *levelSelect) Leave() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user