From ca3393cf33bac79bc40a4f49ce791c5f32316bc4 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 18 Mar 2018 14:19:47 -0400 Subject: [PATCH] v0.6.4: start scene now shows hero subclasses --- .../shatteredpixeldungeon/scenes/StartScene.java | 8 +++++++- .../windows/WndGameInProgress.java | 10 +++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java index 1c2bd2168..ed18e339e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java @@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Chrome; import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.journal.Journal; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator; @@ -162,7 +163,12 @@ public class StartScene extends PixelScene { level = null; } } else { - name.text( Messages.titleCase(info.heroClass.title()) ); + + if (info.subClass != HeroSubClass.NONE){ + name.text(Messages.titleCase(info.subClass.title())); + } else { + name.text(Messages.titleCase(info.heroClass.title())); + } if (hero == null){ hero = new Image(info.heroClass.spritesheet(), 0, 15*info.armorTier, 12, 15); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGameInProgress.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGameInProgress.java index 15fceade1..c810a01c8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGameInProgress.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGameInProgress.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; @@ -52,9 +53,16 @@ public class WndGameInProgress extends Window { final GamesInProgress.Info info = GamesInProgress.check(slot); + String className = null; + if (info.subClass != HeroSubClass.NONE){ + className = info.subClass.title(); + } else { + className = info.heroClass.title(); + } + IconTitle title = new IconTitle(); title.icon( HeroSprite.avatar(info.heroClass, info.armorTier) ); - title.label((Messages.get(this, "title", info.level, info.heroClass.title())).toUpperCase(Locale.ENGLISH)); + title.label((Messages.get(this, "title", info.level, className)).toUpperCase(Locale.ENGLISH)); title.color(Window.SHPX_COLOR); title.setRect( 0, 0, WIDTH, 0 ); add(title);