v0.3.4: reworked rankings to store their cause instead of a result string

This commit is contained in:
Evan Debenham
2016-01-23 02:12:18 -05:00
committed by Evan Debenham
parent 0e2fbc05fb
commit ac967fad27
36 changed files with 79 additions and 65 deletions
@@ -20,6 +20,7 @@
*/
package com.shatteredpixel.shatteredpixeldungeon.scenes;
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.noosa.Camera;
import com.watabou.noosa.Game;
@@ -61,7 +62,7 @@ public class AmuletScene extends PixelScene {
RedButton btnExit = new RedButton( Messages.get(this, "exit") ) {
@Override
protected void onClick() {
Dungeon.win( ResultDescriptions.WIN );
Dungeon.win( Amulet.class );
Dungeon.deleteGame( Dungeon.hero.heroClass, true );
Game.switchScene( noText ? TitleScene.class : RankingsScene.class );
}
@@ -185,7 +185,7 @@ public class RankingsScene extends PixelScene {
position.text(" ");
position.measure();
desc.text( rec.info );
desc.text( rec.deathDesc() );
//desc.measure();
@@ -277,8 +277,8 @@ public class RankingsScene extends PixelScene {
depth.x = steps.x + (steps.width - depth.width()) / 2;
depth.y = steps.y + (steps.height - depth.height()) / 2 + 1;
desc.setPos(shield.x + shield.width + GAP, shield.y + (shield.height - desc.height()) / 2 + 1);
desc.maxWidth((int)(steps.x - desc.left()));
desc.setPos(shield.x + shield.width + GAP, shield.y + (shield.height - desc.height()) / 2 + 1);
}
@Override