restart emulator on ESC

This commit is contained in:
Jairinho 2022-03-01 18:28:23 -03:00
parent 6fbee32542
commit 03ebf6e191
No known key found for this signature in database
GPG Key ID: 954589B18A21D5B6

View File

@ -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()