From 03ebf6e1916e4fa672999a650cfcd373de2c0241 Mon Sep 17 00:00:00 2001 From: Jairinho Date: Tue, 1 Mar 2022 18:28:23 -0300 Subject: [PATCH] restart emulator on ESC --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index a121cc5..cf71cc8 100644 --- a/main.go +++ b/main.go @@ -64,6 +64,10 @@ func (ui *UI) Run() { } func (ui *UI) Update() error { + if ebiten.IsKeyPressed(ebiten.KeyEscape) { + ui.Emulator.Reset() + } + switch ui.State { case LoadingState: go ui.Run()