v0.3.4: externalized changes and welcome scene strings

This commit is contained in:
Evan Debenham
2016-02-01 17:27:47 -05:00
parent 30e1947f18
commit 8797b380db
3 changed files with 17 additions and 48 deletions
@@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes;
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
@@ -35,31 +36,6 @@ import com.watabou.noosa.ui.Component;
//TODO: update this class with relevant info as new versions come out.
public class ChangesScene extends PixelScene {
private static final String TTL_Welcome = "Welcome!";
private static final String TTL_Update = "v0.3.3: Google Play Games!";
private static final String TTL_Future = "Wait What?";
private static final String TXT_Welcome =
"Shattered Pixel Dungeon is a roguelike RPG, with randomly generated enemies, maps, items, and traps!\n" +
"\n" +
"Each run is a new challenging experience, but be careful, death is permanent!\n" +
"\n" +
"Shattered Pixel Dungeon is based on Watabou's Pixel Dungeon, if you're familiar with the original game, here is a list of major changes:\n" +
"- Mage class and wands totally reworked\n" +
"- Rings totally reworked, plus big changes to the rogue\n" +
"- A new category of item: Artifacts!\n" +
"- Enemy, boss, and quest changes to floors 1-10\n" +
"- Subclasses currently being reworked, and are only available after floor 10\n" +
"- Lots of balance changes, including removing degradation\n" +
"- Over 20 new trap types!\n" +
"- A redesigned UI with up to 4 quickslots\n" +
"- Updates with new and reworked content roughly once a month\n" +
"\n" +
"\n" +
"Happy Dungeoneering!";
private static final String TXT_Update =
"v0.3.3b:\n" +
"- Fixed start-crash on android 2.2\n" +
@@ -96,12 +72,6 @@ public class ChangesScene extends PixelScene {
"\n" +
"There's a lot of behind-the-scenes technical changes in this update, so let me know if you run into any issues!";
private static final String TXT_Future =
"It seems that your current saves are from a future version of Shattered Pixel Dungeon!\n\n"+
"Either you're messing around with older versions of the app, or something has gone buggy.\n\n"+
"Regardless, tread with caution! Your saves may contain things which don't exist in this version, "+
"this could cause some very weird errors to occur.";
@Override
public void create() {
super.create();
@@ -109,7 +79,7 @@ public class ChangesScene extends PixelScene {
int w = Camera.main.width;
int h = Camera.main.height;
RenderedText title = PixelScene.renderText( "Recent Changes", 9 );
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
title.hardlight(Window.TITLE_COLOR);
title.x = (w - title.width()) / 2 ;
title.y = 4;
@@ -7,6 +7,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Rankings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites;
import com.shatteredpixel.shatteredpixeldungeon.effects.Fireball;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.watabou.noosa.Camera;
import com.watabou.noosa.Game;
@@ -18,23 +19,13 @@ import javax.microedition.khronos.opengles.GL10;
public class WelcomeScene extends PixelScene {
private static final String TXT_Welcome =
"Shattered Pixel Dungeon is a roguelike RPG, with randomly generated enemies, levels, items, and traps!\n" +
"\n" +
"Each run is a new challenging experience, but be careful, death is permanent!\n" +
"\n" +
"Happy Dungeoneering!";
private static final String TXT_Update =
"add something here on next update.";
@Override
public void create() {
super.create();
final int previousVersion = ShatteredPixelDungeon.version();
if (ShatteredPixelDungeon.versionCode == previousVersion) {
if (ShatteredPixelDungeon.versionCode != previousVersion) {
ShatteredPixelDungeon.switchNoFade(TitleScene.class);
return;
}
@@ -75,7 +66,7 @@ public class WelcomeScene extends PixelScene {
signs.y = title.y;
add( signs );
DarkRedButton okay = new DarkRedButton("Continue"){
DarkRedButton okay = new DarkRedButton(Messages.get(this, "continue")){
@Override
protected void onClick() {
super.onClick();
@@ -85,7 +76,7 @@ public class WelcomeScene extends PixelScene {
};
if (previousVersion != 0){
DarkRedButton changes = new DarkRedButton("Changelist"){
DarkRedButton changes = new DarkRedButton(Messages.get(this, "changelist")){
@Override
protected void onClick() {
super.onClick();
@@ -108,9 +99,11 @@ public class WelcomeScene extends PixelScene {
RenderedTextMultiline text = PixelScene.renderMultiline(6);
if (previousVersion == 0) {
text.text(TXT_Welcome, w - 20);
text.text(Messages.get(this, "welcome_msg"), w - 20);
} else if (previousVersion <= ShatteredPixelDungeon.versionCode) {
text.text(Messages.get(this, "update_msg"), w - 20);
} else {
text.text(TXT_Update, w - 20);
text.text(Messages.get(this, "what_msg"), w - 20);
}
float textSpace = h - title.y - (title.height() - 10) - okay.height() - 2;
text.setPos(10, title.y+(title.height() - 10) + ((textSpace - text.height()) / 2));