v0.3.4: externalized window strings
This commit is contained in:
committed by
Evan Debenham
parent
46aa324eff
commit
0ca46e72cc
@@ -20,21 +20,22 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.watabou.noosa.BitmapTextMultiline;
|
||||
import com.watabou.noosa.NinePatch;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||
import com.watabou.noosa.BitmapTextMultiline;
|
||||
import com.watabou.noosa.NinePatch;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
|
||||
public class WndBlacksmith extends Window {
|
||||
|
||||
@@ -49,14 +50,6 @@ public class WndBlacksmith extends Window {
|
||||
private ItemButton btnItem2;
|
||||
private RedButton btnReforge;
|
||||
|
||||
private static final String TXT_PROMPT =
|
||||
"Ok, a deal is a deal, dat's what I can do for you: I can reforge " +
|
||||
"2 items and turn them into one of a better quality.";
|
||||
private static final String TXT_SELECT =
|
||||
"Select an item to reforge";
|
||||
private static final String TXT_REFORGE =
|
||||
"Reforge them";
|
||||
|
||||
public WndBlacksmith( Blacksmith troll, Hero hero ) {
|
||||
|
||||
super();
|
||||
@@ -67,7 +60,7 @@ public class WndBlacksmith extends Window {
|
||||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
BitmapTextMultiline message = PixelScene.createMultiline( TXT_PROMPT, 6 );
|
||||
BitmapTextMultiline message = PixelScene.createMultiline( Messages.get(this, "prompt"), 6 );
|
||||
message.maxWidth = WIDTH;
|
||||
message.measure();
|
||||
message.y = titlebar.bottom() + GAP;
|
||||
@@ -77,7 +70,7 @@ public class WndBlacksmith extends Window {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
btnPressed = btnItem1;
|
||||
GameScene.selectItem( itemSelector, WndBag.Mode.UPGRADEABLE, TXT_SELECT );
|
||||
GameScene.selectItem( itemSelector, WndBag.Mode.UPGRADEABLE, Messages.get(this, "select") );
|
||||
}
|
||||
};
|
||||
btnItem1.setRect( (WIDTH - BTN_GAP) / 2 - BTN_SIZE, message.y + message.height() + BTN_GAP, BTN_SIZE, BTN_SIZE );
|
||||
@@ -87,13 +80,13 @@ public class WndBlacksmith extends Window {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
btnPressed = btnItem2;
|
||||
GameScene.selectItem( itemSelector, WndBag.Mode.UPGRADEABLE, TXT_SELECT );
|
||||
GameScene.selectItem( itemSelector, WndBag.Mode.UPGRADEABLE, Messages.get(this, "select") );
|
||||
}
|
||||
};
|
||||
btnItem2.setRect( btnItem1.right() + BTN_GAP, btnItem1.top(), BTN_SIZE, BTN_SIZE );
|
||||
add( btnItem2 );
|
||||
|
||||
btnReforge = new RedButton( TXT_REFORGE ) {
|
||||
btnReforge = new RedButton( Messages.get(this, "reforge") ) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
Blacksmith.upgrade( btnItem1.item, btnItem2.item );
|
||||
|
||||
Reference in New Issue
Block a user