diff --git a/cmd/krampus19/levelselect.go b/cmd/krampus19/levelselect.go index 0c0e118..9a64253 100644 --- a/cmd/krampus19/levelselect.go +++ b/cmd/krampus19/levelselect.go @@ -3,6 +3,8 @@ package main import ( "fmt" + "opslag.de/schobers/allg5" + "opslag.de/schobers/krampus19/alui" ) @@ -35,4 +37,14 @@ func (s *levelSelect) Enter(ctx *Context) error { 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() {}