From f04c51b8e6c6a6ea7f07aa4ba68573a49f216473 Mon Sep 17 00:00:00 2001 From: The Ghost in the Machine Date: Wed, 8 Jan 2020 00:50:51 -0500 Subject: [PATCH] v0.2: QoL changes to WndReload --- .../shatteredpixeldungeon/actors/hero/Hero.java | 8 ++++++-- .../shatteredpixeldungeon/windows/WndReload.java | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index a45c48b553..35e3e89185 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -1444,8 +1444,12 @@ public void call() { // 30 is the bit mask for any saving option being enabled } else if (Dungeon.isLearner(30)) { - GameScene.show(new WndReload(cause)); - + Game.runOnRenderThread(new Callback() { + @Override + public void call() { + GameScene.show(new WndReload(cause)); + } + }); } else { reallyDie( cause ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndReload.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndReload.java index b6051cab36..54bc9c5dfd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndReload.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndReload.java @@ -80,4 +80,7 @@ private void addButton( RedButton btn ) { btn.setRect( 0, pos > 0 ? pos += GAP : 0, WIDTH, BTN_HEIGHT ); pos += BTN_HEIGHT; } + + @Override + public void onBackPressed() {} }