diff --git a/assets/icons.png b/assets/icons.png index d6391c122..7865e0d71 100644 Binary files a/assets/icons.png and b/assets/icons.png differ diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/Rankings.java b/src/com/shatteredpixel/shatteredpixeldungeon/Rankings.java index f16ee6c55..2e398e5de 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/Rankings.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/Rankings.java @@ -43,6 +43,8 @@ public enum Rankings { public ArrayList records; public int lastRecord; public int totalNumber; + + private boolean saveNeeded = false; public void submit( boolean win ) { @@ -54,6 +56,8 @@ public enum Rankings { rec.win = win; rec.heroClass = Dungeon.hero.heroClass; rec.armorTier = Dungeon.hero.tier(); + rec.herolevel = Dungeon.hero.lvl; + rec.depth = Dungeon.depth; rec.score = score( win ); String gameFile = Utils.format( DETAILS_FILE, SystemTime.now ); @@ -138,7 +142,7 @@ public enum Rankings { if (totalNumber == 0) { totalNumber = records.size(); } - + } catch (IOException e) { } } @@ -149,6 +153,8 @@ public enum Rankings { private static final String WIN = "win"; private static final String SCORE = "score"; private static final String TIER = "tier"; + private static final String LEVEL = "level"; + private static final String DEPTH = "depth"; private static final String GAME = "gameFile"; public String info; @@ -156,6 +162,8 @@ public enum Rankings { public HeroClass heroClass; public int armorTier; + public int herolevel; //not currently used, but I may want this here in the future. + public int depth; public int score; @@ -172,6 +180,25 @@ public enum Rankings { armorTier = bundle.getInt( TIER ); gameFile = bundle.getString( GAME ); + + //for pre 0.2.3 saves + if (!bundle.contains(LEVEL)){ + try { + depth = Integer.parseInt(info.replaceAll("[\\D]", "")); + } catch (Exception e) { + depth = 0; + } + info = info.split("on level")[0].trim(); + try { + Dungeon.loadGame(gameFile); + herolevel = Dungeon.hero.lvl; + } catch (Exception e){ + herolevel = 0; + } + } else { + depth = bundle.getInt( DEPTH ); + herolevel = bundle.getInt( LEVEL ); + } } @Override @@ -183,6 +210,8 @@ public enum Rankings { heroClass.storeInBundle( bundle ); bundle.put( TIER, armorTier ); + bundle.put( LEVEL, herolevel ); + bundle.put( DEPTH, depth ); bundle.put( GAME, gameFile ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java b/src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java index 4fa23b4af..4e7a129a6 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ResultDescriptions.java @@ -20,25 +20,25 @@ package com.shatteredpixel.shatteredpixeldungeon; public class ResultDescriptions { // Mobs - public static final String MOB = "Killed by %s on level %d"; - public static final String UNIQUE = "Killed by the %s on level %d"; - public static final String NAMED = "Killed by %s on level %d"; + public static final String MOB = "Killed by %s"; + public static final String UNIQUE = "Killed by the %s"; + public static final String NAMED = "Killed by %s"; // Items - public static final String ITEM = "Killed by your own %s on level %d"; - public static final String GLYPH = "Killed by the %s on level %d"; + public static final String ITEM = "Killed by your own %s"; + public static final String GLYPH = "Killed by the %s"; // Dungeon features - public static final String TRAP = "Killed by a %s on level %d"; + public static final String TRAP = "Killed by a %s"; // Debuffs & blobs - public static final String BURNING = "Burned to death on level %d"; - public static final String HUNGER = "Starved to death on level %d"; - public static final String POISON = "Died from poison on level %d"; - public static final String GAS = "Died from toxic gas on level %d"; - public static final String BLEEDING = "Bled to death on level %d"; - public static final String OOZE = "Corroded to death on level %d"; - public static final String FALL = "Fell to death on level %d"; + public static final String BURNING = "Burned to Ash"; + public static final String HUNGER = "Starved to Death"; + public static final String POISON = "Succumbed to Poison"; + public static final String GAS = "Asphyxiated"; + public static final String BLEEDING = "Bled to Death"; + public static final String OOZE = "Melted Away"; + public static final String FALL = "Died on Impact"; public static final String WIN = "Obtained the Amulet of Yendor"; } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 97846e22f..ed8cb0d79 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -159,12 +159,11 @@ public abstract class Char extends Actor { } else { if ( this instanceof Yog ) { - Dungeon.fail( Utils.format( ResultDescriptions.NAMED, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.NAMED, name) ); } if (Bestiary.isUnique( this )) { - Dungeon.fail( Utils.format( ResultDescriptions.UNIQUE, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.UNIQUE, name) ); } else { - Dungeon.fail( Utils.format( ResultDescriptions.MOB, - Utils.indefinite( name ), Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.MOB, Utils.indefinite( name )) ); } GLog.n( TXT_KILL, name ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ToxicGas.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ToxicGas.java index 49e868d04..ccf8fdabe 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ToxicGas.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ToxicGas.java @@ -68,7 +68,7 @@ public class ToxicGas extends Blob implements Hero.Doom { Badges.validateDeathFromGas(); - Dungeon.fail( Utils.format( ResultDescriptions.GAS, Dungeon.depth ) ); + Dungeon.fail( ResultDescriptions.GAS ); GLog.n( "You died from a toxic gas.." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bleeding.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bleeding.java index 4148b89f5..39a28fa33 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bleeding.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Bleeding.java @@ -73,7 +73,7 @@ public class Bleeding extends Buff { } if (target == Dungeon.hero && !target.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.BLEEDING, Dungeon.depth ) ); + Dungeon.fail( ResultDescriptions.BLEEDING ); GLog.n( "You bled to death..." ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java index 9c37e2543..fc58f33be 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java @@ -148,7 +148,7 @@ public class Burning extends Buff implements Hero.Doom { Badges.validateDeathFromFire(); - Dungeon.fail( Utils.format( ResultDescriptions.BURNING, Dungeon.depth ) ); + Dungeon.fail( ResultDescriptions.BURNING ); GLog.n( TXT_BURNED_TO_DEATH ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java index 64695eb05..3355ac010 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java @@ -153,7 +153,7 @@ public class Hunger extends Buff implements Hero.Doom { Badges.validateDeathFromHunger(); - Dungeon.fail( Utils.format( ResultDescriptions.HUNGER, Dungeon.depth ) ); + Dungeon.fail( ResultDescriptions.HUNGER ); GLog.n( TXT_DEATH ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java index 517ed3c59..b8811f885 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Ooze.java @@ -47,7 +47,7 @@ public class Ooze extends Buff { else if (Random.Int(2) == 0) target.damage( 1, this ); if (!target.isAlive() && target == Dungeon.hero) { - Dungeon.fail( Utils.format( ResultDescriptions.OOZE, Dungeon.depth ) ); + Dungeon.fail( ResultDescriptions.OOZE ); GLog.n( TXT_HERO_KILLED, toString() ); } spend( TICK ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Poison.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Poison.java index 125002e1c..dbc9caaee 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Poison.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Poison.java @@ -90,7 +90,7 @@ public class Poison extends Buff implements Hero.Doom { public void onDeath() { Badges.validateDeathFromPoison(); - Dungeon.fail( Utils.format( ResultDescriptions.POISON, Dungeon.depth ) ); + Dungeon.fail( ResultDescriptions.POISON ); GLog.n( "You died from poison..." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java index d9a942ccb..9b7e3b248 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java @@ -132,7 +132,7 @@ public class Eye extends Mob { } if (!ch.isAlive() && ch == Dungeon.hero) { - Dungeon.fail( Utils.format( ResultDescriptions.MOB, Utils.indefinite( name ), Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.MOB, Utils.indefinite( name ) ) ); GLog.n( TXT_DEATHGAZE_KILLED, name ); } } else { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java index 278d91195..eb86f1577 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Shaman.java @@ -106,8 +106,7 @@ public class Shaman extends Mob implements Callback { Camera.main.shake( 2, 0.3f ); if (!enemy.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.MOB, - Utils.indefinite( name ), Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.MOB, Utils.indefinite( name ) ) ); GLog.n( TXT_LIGHTNING_KILLED, name ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Skeleton.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Skeleton.java index eb860f236..c4c669531 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Skeleton.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Skeleton.java @@ -78,7 +78,7 @@ public class Skeleton extends Mob { } if (heroKilled) { - Dungeon.fail( Utils.format( ResultDescriptions.MOB, Utils.indefinite( name ), Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.MOB, Utils.indefinite( name ) ) ); GLog.n( TXT_HERO_KILLED ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java index cba7a45f5..b3056eadb 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Warlock.java @@ -108,8 +108,7 @@ public class Warlock extends Mob implements Callback { enemy.damage( dmg, this ); if (!enemy.isAlive() && enemy == Dungeon.hero) { - Dungeon.fail( Utils.format( ResultDescriptions.MOB, - Utils.indefinite( name ), Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.MOB, Utils.indefinite( name ) ) ); GLog.n( TXT_SHADOWBOLT_KILLED, name ); } } else { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Yog.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Yog.java index 8e2961858..8992a01b5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Yog.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Yog.java @@ -335,7 +335,7 @@ public class Yog extends Mob { enemy.sprite.flash(); if (!enemy.isAlive() && enemy == Dungeon.hero) { - Dungeon.fail( Utils.format( ResultDescriptions.UNIQUE, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.UNIQUE, name ) ); GLog.n( TXT_KILL, name ); } return true; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java index 514b4af8d..379da5d0d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Viscosity.java @@ -127,7 +127,7 @@ public class Viscosity extends Glyph { if (target == Dungeon.hero && !target.isAlive()) { // FIXME Glyph glyph = new Viscosity(); - Dungeon.fail( Utils.format( ResultDescriptions.GLYPH, glyph.name(), Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.GLYPH, glyph.name() ) ); GLog.n( "%s killed you...", glyph.name() ); Badges.validateDeathFromGlyph(); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java index 74b597599..3825ce1b0 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java @@ -107,7 +107,7 @@ public class ChaliceOfBlood extends Artifact { hero.damage(damage, this); if (!hero.isAlive()) { - Dungeon.fail(Utils.format(ResultDescriptions.ITEM, name, Dungeon.depth)); + Dungeon.fail(Utils.format( ResultDescriptions.ITEM, name )); GLog.n("The Chalice sucks your life essence dry..."); } else { upgrade(); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java index 8ce33fd6e..053adf712 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfPsionicBlast.java @@ -64,7 +64,7 @@ public class ScrollOfPsionicBlast extends Scroll { curUser.spendAndNext( TIME_TO_READ ); if (!curUser.isAlive()) { - Dungeon.fail(Utils.format(ResultDescriptions.ITEM, name, Dungeon.depth)); + Dungeon.fail( Utils.format(ResultDescriptions.ITEM, name )); GLog.n("The Psionic Blast tears your mind apart..."); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAvalanche.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAvalanche.java index 95dce7648..e413641c4 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAvalanche.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAvalanche.java @@ -81,7 +81,7 @@ public class WandOfAvalanche extends Wand { } if (!curUser.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name ) ); GLog.n( "You killed yourself with your own Wand of Avalanche..." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFirebolt.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFirebolt.java index 80d5fcd96..e4fa2c054 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFirebolt.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFirebolt.java @@ -66,7 +66,7 @@ public class WandOfFirebolt extends Wand { ch.sprite.emitter().burst( FlameParticle.FACTORY, 5 ); if (ch == curUser && !ch.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name ) ); GLog.n( "You killed yourself with your own Wand of Firebolt..." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java index 8e9edbc6a..1f34e151f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLightning.java @@ -50,7 +50,7 @@ public class WandOfLightning extends Wand { protected void onZap( int cell ) { if (!curUser.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name ) ); GLog.n( "You killed yourself with your own Wand of Lightning..." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java index 5c5211fbe..4f0278226 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java @@ -78,7 +78,7 @@ public class WandOfMagicMissile extends Wand { ch.sprite.burst( 0xFF99CCFF, level / 2 + 2 ); if (ch == curUser && !ch.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name ) ); GLog.n( "You killed yourself with your own Wand of Magic Missile..." ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java index 47d1b27bd..b44ee1468 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/features/Chasm.java @@ -104,7 +104,7 @@ public class Chasm { public void onDeath() { Badges.validateDeathFromFalling(); - Dungeon.fail( Utils.format( ResultDescriptions.FALL, Dungeon.depth ) ); + Dungeon.fail( ResultDescriptions.FALL ); GLog.n( "You fell to death..." ); } } ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/LightningTrap.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/LightningTrap.java index 61091b1b7..9d5c20d14 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/LightningTrap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/LightningTrap.java @@ -45,7 +45,7 @@ public class LightningTrap { Camera.main.shake( 2, 0.3f ); if (!ch.isAlive()) { - Dungeon.fail( Utils.format( ResultDescriptions.TRAP, name, Dungeon.depth ) ); + Dungeon.fail( Utils.format( ResultDescriptions.TRAP, name ) ); GLog.n( "You were killed by a discharge of a lightning trap..." ); } else { ((Hero)ch).belongings.charge( false ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java index 4042f4b9d..821baca2c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java @@ -138,7 +138,10 @@ public class RankingsScene extends PixelScene { private Flare flare; private BitmapText position; private BitmapTextMultiline desc; + private Image steps; + private BitmapText depth; private Image classIcon; + private BitmapText level; public Record( int pos, boolean latest, Rankings.Record rec ) { super(); @@ -168,9 +171,29 @@ public class RankingsScene extends PixelScene { shield.view( ItemSpriteSheet.AMULET, null ); position.hardlight( TEXT_WIN[odd] ); desc.hardlight( TEXT_WIN[odd] ); + depth.hardlight( TEXT_WIN[odd] ); + level.hardlight( TEXT_WIN[odd] ); } else { position.hardlight( TEXT_LOSE[odd] ); desc.hardlight( TEXT_LOSE[odd] ); + depth.hardlight( TEXT_LOSE[odd] ); + level.hardlight( TEXT_LOSE[odd] ); + + if (rec.depth != 0){ + depth.text( Integer.toString(rec.depth) ); + depth.measure(); + steps.copy(Icons.DEPTH_LG.get()); + + add(steps); + add(depth); + } + + } + + if (rec.herolevel != 0){ + level.text( Integer.toString(rec.herolevel) ); + level.measure(); + add(level); } classIcon.copy( Icons.get( rec.heroClass ) ); @@ -185,13 +208,22 @@ public class RankingsScene extends PixelScene { add( shield ); position = new BitmapText( PixelScene.font1x ); + position.alpha(0.8f); add( position ); desc = createMultiline( 9 ); add( desc ); + + depth = new BitmapText( PixelScene.font1x ); + depth.alpha(0.8f); + + steps = new Image(); classIcon = new Image(); add( classIcon ); + + level = new BitmapText( PixelScene.font1x ); + level.alpha(0.8f); } @Override @@ -208,12 +240,21 @@ public class RankingsScene extends PixelScene { if (flare != null) { flare.point( shield.center() ); } - - classIcon.x = align( x + width - classIcon.width ); + + classIcon.x = align(x + width - classIcon.width); classIcon.y = shield.y; - + + level.x = align( classIcon.x + (classIcon.width - level.width()) / 2 ); + level.y = align( classIcon.y + (classIcon.height - level.height()) / 2 + 1 ); + + steps.x = align(x + width - steps.width - classIcon.width); + steps.y = shield.y; + + depth.x = align( steps.x + (steps.width - depth.width()) / 2 ); + depth.y = align( steps.y + (steps.height - depth.height()) / 2 + 1 ); + desc.x = shield.x + shield.width + GAP; - desc.maxWidth = (int)(classIcon.x - desc.x); + desc.maxWidth = (int)(steps.x - desc.x); desc.measure(); desc.y = align( shield.y + (shield.height - desc.height()) / 2 + 1 ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java index a3bddeb35..7620e8ccf 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java @@ -39,6 +39,7 @@ public enum Icons { HUNTRESS, CLOSE, DEPTH, + DEPTH_LG, SLEEP, ALERT, BACKPACK, @@ -106,6 +107,9 @@ public enum Icons { case DEPTH: icon.frame( icon.texture.uvRect( 45, 12, 54, 20 ) ); break; + case DEPTH_LG: + icon.frame( icon.texture.uvRect( 34, 46, 50, 62 ) ); + break; case SLEEP: icon.frame( icon.texture.uvRect( 13, 45, 22, 53 ) ); break;