v1.2.0: adjusted hero select scene to fix a crash with some AMD drivers

This commit is contained in:
Evan Debenham 2022-02-16 13:18:22 -05:00
parent e95920bb29
commit d7aef5bd39

View File

@ -21,6 +21,8 @@
package com.shatteredpixel.shatteredpixeldungeon.scenes; 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.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Chrome; import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@ -106,12 +108,6 @@ public class HeroSelectScene extends PixelScene {
add(fadeRight); 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, ""){ startBtn = new StyledButton(Chrome.Type.GREY_BUTTON_TR, ""){
@Override @Override
protected void onClick() { protected void onClick() {
@ -211,6 +207,12 @@ public class HeroSelectScene extends PixelScene {
add( btnExit ); add( btnExit );
btnExit.visible = !SPDSettings.intro() || Rankings.INSTANCE.totalNumber > 0; 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){ PointerArea fadeResetter = new PointerArea(0, 0, Camera.main.width, Camera.main.height){
@Override @Override
public boolean onSignal(PointerEvent event) { public boolean onSignal(PointerEvent event) {