v0.3.4: externalized window strings
This commit is contained in:
committed by
Evan Debenham
parent
46aa324eff
commit
0ca46e72cc
@@ -20,27 +20,21 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.watabou.noosa.BitmapTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Imp;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.DwarfToken;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
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 WndImp extends Window {
|
||||
|
||||
private static final String TXT_MESSAGE =
|
||||
"Oh yes! You are my hero!\n" +
|
||||
"Regarding your reward, I don't have cash with me right now, but I have something better for you. " +
|
||||
"This is my family heirloom ring: my granddad took it off a dead paladin's finger.";
|
||||
private static final String TXT_REWARD = "Take the ring";
|
||||
|
||||
private static final int WIDTH = 120;
|
||||
private static final int BTN_HEIGHT = 20;
|
||||
private static final int GAP = 2;
|
||||
@@ -55,13 +49,13 @@ public class WndImp extends Window {
|
||||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
BitmapTextMultiline message = PixelScene.createMultiline( TXT_MESSAGE, 6 );
|
||||
BitmapTextMultiline message = PixelScene.createMultiline( Messages.get(this, "message"), 6 );
|
||||
message.maxWidth = WIDTH;
|
||||
message.measure();
|
||||
message.y = titlebar.bottom() + GAP;
|
||||
add( message );
|
||||
|
||||
RedButton btnReward = new RedButton( TXT_REWARD ) {
|
||||
RedButton btnReward = new RedButton( Messages.get(this, "reward") ) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
takeReward( imp, tokens, Imp.Quest.reward );
|
||||
|
||||
Reference in New Issue
Block a user