From d7aef5bd392bed43197c5e254072d000040c4ba8 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 16 Feb 2022 13:18:22 -0500 Subject: [PATCH] v1.2.0: adjusted hero select scene to fix a crash with some AMD drivers --- .../scenes/HeroSelectScene.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java index cab78c802..36c54ea57 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java @@ -21,6 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.graphics.GL20; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Chrome; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -106,12 +108,6 @@ public class HeroSelectScene extends PixelScene { add(fadeRight); } - prompt = PixelScene.renderTextBlock(Messages.get(this, "title"), 12); - prompt.hardlight(Window.TITLE_COLOR); - prompt.setPos( (Camera.main.width - prompt.width())/2f, (Camera.main.height - HeroBtn.HEIGHT - prompt.height() - 4)); - PixelScene.align(prompt); - add(prompt); - startBtn = new StyledButton(Chrome.Type.GREY_BUTTON_TR, ""){ @Override protected void onClick() { @@ -211,6 +207,12 @@ public class HeroSelectScene extends PixelScene { add( btnExit ); btnExit.visible = !SPDSettings.intro() || Rankings.INSTANCE.totalNumber > 0; + prompt = PixelScene.renderTextBlock(Messages.get(this, "title"), 12); + prompt.hardlight(Window.TITLE_COLOR); + prompt.setPos( (Camera.main.width - prompt.width())/2f, (Camera.main.height - HeroBtn.HEIGHT - prompt.height() - 4)); + PixelScene.align(prompt); + add(prompt); + PointerArea fadeResetter = new PointerArea(0, 0, Camera.main.width, Camera.main.height){ @Override public boolean onSignal(PointerEvent event) {