v0.3.4 externalized most scene strings

This commit is contained in:
Evan Debenham
2015-12-31 02:23:01 -05:00
committed by Evan Debenham
parent c16ae2ac0b
commit d8b74a3a0e
10 changed files with 145 additions and 168 deletions
@@ -20,6 +20,7 @@
*/
package com.shatteredpixel.shatteredpixeldungeon.scenes;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.noosa.BitmapTextMultiline;
import com.watabou.noosa.Camera;
import com.watabou.noosa.Game;
@@ -33,21 +34,12 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.watabou.utils.Random;
public class AmuletScene extends PixelScene {
private static final String TXT_EXIT = "Let's call it a day";
private static final String TXT_STAY = "I'm not done yet";
private static final int WIDTH = 120;
private static final int BTN_HEIGHT = 18;
private static final float SMALL_GAP = 2;
private static final float LARGE_GAP = 8;
private static final String TXT =
"You finally hold it in your hands, the Amulet of Yendor. Using its power " +
"you can take over the world or bring peace and prosperity to people or whatever. " +
"Anyway, your life will change forever and this game will end here. " +
"Or you can stay a mere mortal a little longer.";
public static boolean noText = false;
private Image amulet;
@@ -58,7 +50,7 @@ public class AmuletScene extends PixelScene {
BitmapTextMultiline text = null;
if (!noText) {
text = createMultiline( TXT, 8 );
text = createMultiline( Messages.get(this, "text"), 8 );
text.maxWidth = WIDTH;
text.measure();
add( text );
@@ -67,7 +59,7 @@ public class AmuletScene extends PixelScene {
amulet = new Image( Assets.AMULET );
add( amulet );
RedButton btnExit = new RedButton( TXT_EXIT ) {
RedButton btnExit = new RedButton( Messages.get(this, "exit") ) {
@Override
protected void onClick() {
Dungeon.win( ResultDescriptions.WIN );
@@ -78,7 +70,7 @@ public class AmuletScene extends PixelScene {
btnExit.setSize( WIDTH, BTN_HEIGHT );
add( btnExit );
RedButton btnStay = new RedButton( TXT_STAY ) {
RedButton btnStay = new RedButton( Messages.get(this, "stay") ) {
@Override
protected void onClick() {
onBackPressed();