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

View File

@ -6,6 +6,8 @@ scenes.amuletscene.text=You finally hold it in your hands, the Amulet of Yendor.
scenes.badgesscene.title=Your Badges scenes.badgesscene.title=Your Badges
scenes.changesscene.title=Recent Changes
scenes.gamescene.welcome=Welcome to the level %d of Pixel Dungeon! scenes.gamescene.welcome=Welcome to the level %d of Pixel Dungeon!
scenes.gamescene.welcome_back=Welcome back to the level %d of Pixel Dungeon! scenes.gamescene.welcome_back=Welcome back to the level %d of Pixel Dungeon!
scenes.gamescene.chasm=Your steps echo across the dungeon. scenes.gamescene.chasm=Your steps echo across the dungeon.
@ -49,4 +51,8 @@ scenes.titlescene.rankings=Rankings
scenes.titlescene.badges=Badges scenes.titlescene.badges=Badges
scenes.titlescene.about=About scenes.titlescene.about=About
#scenes.welcomescene.= scenes.welcomescene.welcome_msg=Shattered Pixel Dungeon is a roguelike RPG, with randomly generated enemies, levels, items, and traps!\n\nEach run is a new challenging experience, but be careful, death is permanent!\n\nHappy Dungeoneering!
scenes.welcomescene.update_msg=Look at that, a brand new update page, pretty!\n\nAt this stage there are a few refinements left to be made to the language selection ui and then all the code support for translation will be done.\n\nWe are very close to first release! My goal is to have 0.3.4 released by the end of the week!\n\nWe can make further translation improvements/fixes through patches.
scenes.welcomescene.what_msg=It seems that your current saves are from a future version of Shattered Pixel Dungeon!\n\nTread with caution! Your saves may contain things which don't exist in this version, this could cause some very weird errors to occur.
scenes.welcomescene.continue=Continue
scenes.welcomescene.changelist=Changelist

View File

@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes;
import com.shatteredpixel.shatteredpixeldungeon.Chrome; import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs; import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton; import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane; 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. //TODO: update this class with relevant info as new versions come out.
public class ChangesScene extends PixelScene { 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 = private static final String TXT_Update =
"v0.3.3b:\n" + "v0.3.3b:\n" +
"- Fixed start-crash on android 2.2\n" + "- Fixed start-crash on android 2.2\n" +
@ -96,12 +72,6 @@ public class ChangesScene extends PixelScene {
"\n" + "\n" +
"There's a lot of behind-the-scenes technical changes in this update, so let me know if you run into any issues!"; "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 @Override
public void create() { public void create() {
super.create(); super.create();
@ -109,7 +79,7 @@ public class ChangesScene extends PixelScene {
int w = Camera.main.width; int w = Camera.main.width;
int h = Camera.main.height; 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.hardlight(Window.TITLE_COLOR);
title.x = (w - title.width()) / 2 ; title.x = (w - title.width()) / 2 ;
title.y = 4; title.y = 4;

View File

@ -7,6 +7,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Rankings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites; import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites;
import com.shatteredpixel.shatteredpixeldungeon.effects.Fireball; import com.shatteredpixel.shatteredpixeldungeon.effects.Fireball;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton; import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.watabou.noosa.Camera; import com.watabou.noosa.Camera;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
@ -18,23 +19,13 @@ import javax.microedition.khronos.opengles.GL10;
public class WelcomeScene extends PixelScene { 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 @Override
public void create() { public void create() {
super.create(); super.create();
final int previousVersion = ShatteredPixelDungeon.version(); final int previousVersion = ShatteredPixelDungeon.version();
if (ShatteredPixelDungeon.versionCode == previousVersion) { if (ShatteredPixelDungeon.versionCode != previousVersion) {
ShatteredPixelDungeon.switchNoFade(TitleScene.class); ShatteredPixelDungeon.switchNoFade(TitleScene.class);
return; return;
} }
@ -75,7 +66,7 @@ public class WelcomeScene extends PixelScene {
signs.y = title.y; signs.y = title.y;
add( signs ); add( signs );
DarkRedButton okay = new DarkRedButton("Continue"){ DarkRedButton okay = new DarkRedButton(Messages.get(this, "continue")){
@Override @Override
protected void onClick() { protected void onClick() {
super.onClick(); super.onClick();
@ -85,7 +76,7 @@ public class WelcomeScene extends PixelScene {
}; };
if (previousVersion != 0){ if (previousVersion != 0){
DarkRedButton changes = new DarkRedButton("Changelist"){ DarkRedButton changes = new DarkRedButton(Messages.get(this, "changelist")){
@Override @Override
protected void onClick() { protected void onClick() {
super.onClick(); super.onClick();
@ -108,9 +99,11 @@ public class WelcomeScene extends PixelScene {
RenderedTextMultiline text = PixelScene.renderMultiline(6); RenderedTextMultiline text = PixelScene.renderMultiline(6);
if (previousVersion == 0) { 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 { } 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; float textSpace = h - title.y - (title.height() - 10) - okay.height() - 2;
text.setPos(10, title.y+(title.height() - 10) + ((textSpace - text.height()) / 2)); text.setPos(10, title.y+(title.height() - 10) + ((textSpace - text.height()) / 2));