v0.3.4: externalized window strings
This commit is contained in:
committed by
Evan Debenham
parent
46aa324eff
commit
0ca46e72cc
@@ -20,38 +20,24 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CorpseDust;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.Embers;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Rotberry;
|
||||
import com.watabou.noosa.BitmapTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CorpseDust;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.Embers;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Rotberry;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||
import com.watabou.noosa.BitmapTextMultiline;
|
||||
|
||||
public class WndWandmaker extends Window {
|
||||
|
||||
private static final String TXT_DUST =
|
||||
"Oh, I see you have the dust! Don't worry about the wraiths, I can deal with them. " +
|
||||
"As I promised, you can choose one of my high quality wands.";
|
||||
|
||||
private static final String TXT_EMBER =
|
||||
"Oh, I see you have the embers! I do hope the fire elemental wasn't too much trouble. " +
|
||||
"As I promised, you can choose one of my high quality wands.";
|
||||
|
||||
private static final String TXT_BERRY =
|
||||
"Oh, I see you have the berry! I do hope the rotberry plant didn't trouble you too much. " +
|
||||
"As I promised, you can choose one of my high quality wands.";
|
||||
|
||||
private static final String TXT_FARAWELL = "Good luck in your quest, %s!";
|
||||
|
||||
private static final int WIDTH = 120;
|
||||
private static final int BTN_HEIGHT = 20;
|
||||
private static final float GAP = 2;
|
||||
@@ -68,11 +54,11 @@ public class WndWandmaker extends Window {
|
||||
|
||||
String msg = "";
|
||||
if (item instanceof CorpseDust){
|
||||
msg = TXT_DUST;
|
||||
msg = Messages.get(this, "dust");
|
||||
} else if (item instanceof Embers){
|
||||
msg = TXT_EMBER;
|
||||
msg = Messages.get(this, "ember");
|
||||
} else if (item instanceof Rotberry.Seed){
|
||||
msg = TXT_BERRY;
|
||||
msg = Messages.get(this, "berry");
|
||||
}
|
||||
|
||||
BitmapTextMultiline message = PixelScene.createMultiline( msg, 6 );
|
||||
@@ -115,7 +101,7 @@ public class WndWandmaker extends Window {
|
||||
Dungeon.level.drop( reward, wandmaker.pos ).sprite.drop();
|
||||
}
|
||||
|
||||
wandmaker.yell( Utils.format( TXT_FARAWELL, Dungeon.hero.givenName() ) );
|
||||
wandmaker.yell( Messages.get(this, "farewell", Dungeon.hero.givenName()) );
|
||||
wandmaker.destroy();
|
||||
|
||||
wandmaker.sprite.die();
|
||||
|
||||
Reference in New Issue
Block a user