mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Prevent getting stuck on ViewWinLose by pressing Escape or Back
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package forge.screens.match.winlose;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
|
||||
import forge.Forge;
|
||||
@@ -206,4 +207,13 @@ public class ViewWinLose extends FOverlay {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyDown(int keyCode) {
|
||||
if (keyCode == Keys.ESCAPE || keyCode == Keys.BACK) {
|
||||
btnQuit.trigger(); //quit on escape or back
|
||||
return true;
|
||||
}
|
||||
return super.keyDown(keyCode);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user