v0.7.5b: renamed RenderedTextMultiline to RenderedTextBlock
This commit is contained in:
parent
03ebdde440
commit
c1bd838883
|
@ -43,7 +43,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.android.AndroidLauncher;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.Game;
|
||||
|
||||
|
@ -87,7 +87,7 @@ public class WndAndroidTextInput extends Window {
|
|||
((AndroidApplication)Gdx.app).runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
RenderedTextMultiline txtTitle = PixelScene.renderMultiline( title, 9 );
|
||||
RenderedTextBlock txtTitle = PixelScene.renderTextBlock( title, 9 );
|
||||
txtTitle.maxWidth( width );
|
||||
txtTitle.hardlight( Window.TITLE_COLOR );
|
||||
txtTitle.setPos( (width - txtTitle.width()) /2, 0);
|
||||
|
|
|
@ -24,7 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.effects;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.RenderedText;
|
||||
|
@ -33,7 +33,7 @@ import com.watabou.utils.SparseArray;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FloatingText extends RenderedTextMultiline {
|
||||
public class FloatingText extends RenderedTextBlock {
|
||||
|
||||
private static final float LIFESPAN = 1f;
|
||||
private static final float DISTANCE = DungeonTilemap.SIZE;
|
||||
|
|
|
@ -55,7 +55,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
|
||||
|
@ -881,8 +881,8 @@ public class DriedRose extends Artifact {
|
|||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline message =
|
||||
PixelScene.renderMultiline(Messages.get(this, "desc", rose.ghostStrength()), 6);
|
||||
RenderedTextBlock message =
|
||||
PixelScene.renderTextBlock(Messages.get(this, "desc", rose.ghostStrength()), 6);
|
||||
message.maxWidth( WIDTH );
|
||||
message.setPos(0, titlebar.bottom() + GAP);
|
||||
add( message );
|
||||
|
|
|
@ -32,7 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
|
||||
|
@ -133,7 +133,7 @@ public class ScrollOfDivination extends ExoticScroll {
|
|||
cur.setRect(0, 0, WIDTH, 0);
|
||||
add(cur);
|
||||
|
||||
RenderedTextMultiline msg = PixelScene.renderMultiline(Messages.get(this, "desc"), 6);
|
||||
RenderedTextBlock msg = PixelScene.renderTextBlock(Messages.get(this, "desc"), 6);
|
||||
msg.maxWidth(120);
|
||||
msg.setPos(0, cur.bottom() + 2);
|
||||
add(msg);
|
||||
|
|
|
@ -30,7 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||
|
@ -83,7 +83,7 @@ public class StoneOfAugmentation extends InventoryStone {
|
|||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline tfMesage = PixelScene.renderMultiline( Messages.get(this, "choice"), 8 );
|
||||
RenderedTextBlock tfMesage = PixelScene.renderTextBlock( Messages.get(this, "choice"), 8 );
|
||||
tfMesage.maxWidth(WIDTH - MARGIN * 2);
|
||||
tfMesage.setPos(MARGIN, titlebar.bottom() + MARGIN);
|
||||
add( tfMesage );
|
||||
|
|
|
@ -59,7 +59,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.IconButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
|
||||
|
@ -129,7 +129,7 @@ public class StoneOfIntuition extends InventoryStone {
|
|||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline text = PixelScene.renderMultiline(6);
|
||||
RenderedTextBlock text = PixelScene.renderTextBlock(6);
|
||||
text.text( Messages.get(this, "text") );
|
||||
text.setPos(0, titlebar.bottom());
|
||||
text.maxWidth( WIDTH );
|
||||
|
|
|
@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.input.PointerEvent;
|
||||
import com.watabou.noosa.Camera;
|
||||
|
@ -68,7 +68,7 @@ public class AboutScene extends PixelScene {
|
|||
|
||||
new Flare( 7, 64 ).color( 0x225511, true ).show( shpx, 0 ).angularSpeed = +20;
|
||||
|
||||
RenderedTextMultiline shpxtitle = renderMultiline( TTL_SHPX, 8 );
|
||||
RenderedTextBlock shpxtitle = renderTextBlock( TTL_SHPX, 8 );
|
||||
shpxtitle.hardlight( Window.SHPX_COLOR );
|
||||
add( shpxtitle );
|
||||
|
||||
|
@ -78,14 +78,14 @@ public class AboutScene extends PixelScene {
|
|||
);
|
||||
align(shpxtitle);
|
||||
|
||||
RenderedTextMultiline shpxtext = renderMultiline( TXT_SHPX, 8 );
|
||||
RenderedTextBlock shpxtext = renderTextBlock( TXT_SHPX, 8 );
|
||||
shpxtext.maxWidth((int)Math.min(colWidth, 120));
|
||||
add( shpxtext );
|
||||
|
||||
shpxtext.setPos((colWidth - shpxtext.width()) / 2, shpxtitle.bottom() + 12);
|
||||
align(shpxtext);
|
||||
|
||||
RenderedTextMultiline shpxlink = renderMultiline( LNK_SHPX, 8 );
|
||||
RenderedTextBlock shpxlink = renderTextBlock( LNK_SHPX, 8 );
|
||||
shpxlink.maxWidth(shpxtext.maxWidth());
|
||||
shpxlink.hardlight( Window.SHPX_COLOR );
|
||||
add( shpxlink );
|
||||
|
@ -111,7 +111,7 @@ public class AboutScene extends PixelScene {
|
|||
|
||||
new Flare( 7, 64 ).color( 0x112233, true ).show( wata, 0 ).angularSpeed = +20;
|
||||
|
||||
RenderedTextMultiline wataTitle = renderMultiline( TTL_WATA, 8 );
|
||||
RenderedTextBlock wataTitle = renderTextBlock( TTL_WATA, 8 );
|
||||
wataTitle.hardlight(Window.TITLE_COLOR);
|
||||
add( wataTitle );
|
||||
|
||||
|
@ -121,7 +121,7 @@ public class AboutScene extends PixelScene {
|
|||
);
|
||||
align(wataTitle);
|
||||
|
||||
RenderedTextMultiline wataText = renderMultiline( TXT_WATA, 8 );
|
||||
RenderedTextBlock wataText = renderTextBlock( TXT_WATA, 8 );
|
||||
wataText.maxWidth((int)Math.min(colWidth, 120));
|
||||
wataText.setHightlighting(false); //underscore in cube_code
|
||||
add( wataText );
|
||||
|
@ -129,7 +129,7 @@ public class AboutScene extends PixelScene {
|
|||
wataText.setPos(wataOffset + (colWidth - wataText.width()) / 2, wataTitle.bottom() + 12);
|
||||
align(wataText);
|
||||
|
||||
RenderedTextMultiline wataLink = renderMultiline( LNK_WATA, 8 );
|
||||
RenderedTextBlock wataLink = renderTextBlock( LNK_WATA, 8 );
|
||||
wataLink.maxWidth((int)Math.min(colWidth, 120));
|
||||
wataLink.hardlight(Window.TITLE_COLOR);
|
||||
add(wataLink);
|
||||
|
|
|
@ -42,7 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.IconButton;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndInfoItem;
|
||||
|
@ -75,8 +75,8 @@ public class AlchemyScene extends PixelScene {
|
|||
private Emitter lowerBubbles;
|
||||
private SkinnedBlock water;
|
||||
|
||||
private RenderedTextMultiline energyLeft;
|
||||
private RenderedTextMultiline energyCost;
|
||||
private RenderedTextBlock energyLeft;
|
||||
private RenderedTextBlock energyCost;
|
||||
|
||||
private RedButton btnCombine;
|
||||
|
||||
|
@ -113,7 +113,7 @@ public class AlchemyScene extends PixelScene {
|
|||
add(im);
|
||||
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline( Messages.get(this, "title"), 9 );
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 9 );
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.setPos(
|
||||
(Camera.main.width - title.width()) / 2f,
|
||||
|
@ -127,7 +127,7 @@ public class AlchemyScene extends PixelScene {
|
|||
|
||||
int pos = (Camera.main.height - 100)/2;
|
||||
|
||||
RenderedTextMultiline desc = PixelScene.renderMultiline(6);
|
||||
RenderedTextBlock desc = PixelScene.renderTextBlock(6);
|
||||
desc.maxWidth(w);
|
||||
desc.text( Messages.get(AlchemyScene.class, "text") );
|
||||
desc.setPos(left + (w - desc.width())/2, pos);
|
||||
|
@ -274,14 +274,14 @@ public class AlchemyScene extends PixelScene {
|
|||
btnGuide.setRect(0, 0, 20, 20);
|
||||
add(btnGuide);
|
||||
|
||||
energyLeft = PixelScene.renderMultiline(Messages.get(AlchemyScene.class, "energy", availableEnergy()), 9);
|
||||
energyLeft = PixelScene.renderTextBlock(Messages.get(AlchemyScene.class, "energy", availableEnergy()), 9);
|
||||
energyLeft.setPos(
|
||||
(Camera.main.width - energyLeft.width())/2,
|
||||
Camera.main.height - 5 - energyLeft.height()
|
||||
);
|
||||
add(energyLeft);
|
||||
|
||||
energyCost = PixelScene.renderMultiline(6);
|
||||
energyCost = PixelScene.renderTextBlock(6);
|
||||
add(energyCost);
|
||||
|
||||
fadeIn();
|
||||
|
|
|
@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Image;
|
||||
|
@ -50,9 +50,9 @@ public class AmuletScene extends PixelScene {
|
|||
public void create() {
|
||||
super.create();
|
||||
|
||||
RenderedTextMultiline text = null;
|
||||
RenderedTextBlock text = null;
|
||||
if (!noText) {
|
||||
text = renderMultiline( Messages.get(this, "text"), 8 );
|
||||
text = renderTextBlock( Messages.get(this, "text"), 8 );
|
||||
text.maxWidth(WIDTH);
|
||||
add( text );
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.BadgeBanner;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBadge;
|
||||
import com.watabou.noosa.Camera;
|
||||
|
@ -63,7 +63,7 @@ public class BadgesScene extends PixelScene {
|
|||
float left = 5;
|
||||
float top = 20;
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline( Messages.get(this, "title"), 9 );
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 9 );
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.setPos(
|
||||
(w - title.width()) / 2f,
|
||||
|
|
|
@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.ChangeInfo;
|
||||
|
@ -55,7 +55,7 @@ public class ChangesScene extends PixelScene {
|
|||
int w = Camera.main.width;
|
||||
int h = Camera.main.height;
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline( Messages.get(this, "title"), 9 );
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 9 );
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.setPos(
|
||||
(w - title.width()) / 2f,
|
||||
|
|
|
@ -34,7 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.GameLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndError;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndStory;
|
||||
import com.watabou.gltextures.TextureCache;
|
||||
|
@ -80,7 +80,7 @@ public class InterlevelScene extends PixelScene {
|
|||
private Phase phase;
|
||||
private float timeLeft;
|
||||
|
||||
private RenderedTextMultiline message;
|
||||
private RenderedTextBlock message;
|
||||
|
||||
private static Thread thread;
|
||||
private static Exception error = null;
|
||||
|
@ -183,7 +183,7 @@ public class InterlevelScene extends PixelScene {
|
|||
|
||||
String text = Messages.get(Mode.class, mode.name());
|
||||
|
||||
message = PixelScene.renderMultiline( text, 9 );
|
||||
message = PixelScene.renderTextBlock( text, 9 );
|
||||
message.setPos(
|
||||
(Camera.main.width - message.width()) / 2,
|
||||
(Camera.main.height - message.height()) / 2
|
||||
|
|
|
@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.effects.BadgeBanner;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.glwrap.Blending;
|
||||
import com.watabou.input.PointerEvent;
|
||||
|
@ -244,22 +244,12 @@ public class PixelScene extends Scene {
|
|||
return result;
|
||||
}
|
||||
|
||||
//public static RenderedText renderText( int size ) {
|
||||
// return renderText("", size);
|
||||
//}
|
||||
|
||||
/*public static RenderedText renderText( String text, int size ) {
|
||||
RenderedText result = new RenderedText( text, size*defaultZoom);
|
||||
result.scale.set(1/(float)defaultZoom);
|
||||
return result;
|
||||
}*/
|
||||
|
||||
public static RenderedTextMultiline renderMultiline( int size ){
|
||||
return renderMultiline("", size);
|
||||
public static RenderedTextBlock renderTextBlock(int size ){
|
||||
return renderTextBlock("", size);
|
||||
}
|
||||
|
||||
public static RenderedTextMultiline renderMultiline( String text, int size ){
|
||||
RenderedTextMultiline result = new RenderedTextMultiline( text, size*defaultZoom);
|
||||
public static RenderedTextBlock renderTextBlock(String text, int size ){
|
||||
RenderedTextBlock result = new RenderedTextBlock( text, size*defaultZoom);
|
||||
result.zoom(1/(float)defaultZoom);
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndError;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndRanking;
|
||||
|
@ -72,7 +72,7 @@ public class RankingsScene extends PixelScene {
|
|||
|
||||
Rankings.INSTANCE.load();
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline( Messages.get(this, "title"), 9);
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 9);
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.setPos(
|
||||
(w - title.width()) / 2f,
|
||||
|
@ -107,7 +107,7 @@ public class RankingsScene extends PixelScene {
|
|||
|
||||
if (Rankings.INSTANCE.totalNumber >= Rankings.TABLE_SIZE) {
|
||||
|
||||
RenderedTextMultiline label = PixelScene.renderMultiline( 8 );
|
||||
RenderedTextBlock label = PixelScene.renderTextBlock( 8 );
|
||||
label.hardlight( 0xCCCCCC );
|
||||
label.setHightlighting(true, Window.SHPX_COLOR);
|
||||
label.text( Messages.get(this, "total") + " _" + Rankings.INSTANCE.wonNumber + "_/" + Rankings.INSTANCE.totalNumber );
|
||||
|
@ -123,7 +123,7 @@ public class RankingsScene extends PixelScene {
|
|||
|
||||
} else {
|
||||
|
||||
RenderedTextMultiline noRec = PixelScene.renderMultiline(Messages.get(this, "no_games"), 8);
|
||||
RenderedTextBlock noRec = PixelScene.renderTextBlock(Messages.get(this, "no_games"), 8);
|
||||
noRec.hardlight( 0xCCCCCC );
|
||||
noRec.setPos(
|
||||
(w - noRec.width()) / 2,
|
||||
|
@ -160,7 +160,7 @@ public class RankingsScene extends PixelScene {
|
|||
protected ItemSprite shield;
|
||||
private Flare flare;
|
||||
private BitmapText position;
|
||||
private RenderedTextMultiline desc;
|
||||
private RenderedTextBlock desc;
|
||||
private Image steps;
|
||||
private BitmapText depth;
|
||||
private Image classIcon;
|
||||
|
@ -237,7 +237,7 @@ public class RankingsScene extends PixelScene {
|
|||
position = new BitmapText( PixelScene.pixelFont);
|
||||
add( position );
|
||||
|
||||
desc = renderMultiline( 7 );
|
||||
desc = renderTextBlock( 7 );
|
||||
add( desc );
|
||||
|
||||
depth = new BitmapText( PixelScene.pixelFont);
|
||||
|
|
|
@ -32,7 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndGameInProgress;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndStartGame;
|
||||
|
@ -69,7 +69,7 @@ public class StartScene extends PixelScene {
|
|||
btnExit.setPos( w - btnExit.width(), 0 );
|
||||
add( btnExit );
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline( Messages.get(this, "title"), 9);
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 9);
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.setPos(
|
||||
(w - title.width()) / 2f,
|
||||
|
@ -122,7 +122,7 @@ public class StartScene extends PixelScene {
|
|||
private NinePatch bg;
|
||||
|
||||
private Image hero;
|
||||
private RenderedTextMultiline name;
|
||||
private RenderedTextBlock name;
|
||||
|
||||
private Image steps;
|
||||
private BitmapText depth;
|
||||
|
@ -139,7 +139,7 @@ public class StartScene extends PixelScene {
|
|||
bg = Chrome.get(Chrome.Type.GEM);
|
||||
add( bg);
|
||||
|
||||
name = PixelScene.renderMultiline(9);
|
||||
name = PixelScene.renderTextBlock(9);
|
||||
add(name);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.journal.Document;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.journal.Journal;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.StyledButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndStartGame;
|
||||
import com.watabou.glwrap.Blending;
|
||||
|
@ -132,7 +132,7 @@ public class WelcomeScene extends PixelScene {
|
|||
add(okay);
|
||||
}
|
||||
|
||||
RenderedTextMultiline text = PixelScene.renderMultiline(6);
|
||||
RenderedTextBlock text = PixelScene.renderTextBlock(6);
|
||||
String message;
|
||||
if (previousVersion == 0) {
|
||||
message = Messages.get(this, "welcome_msg");
|
||||
|
|
|
@ -85,7 +85,7 @@ public class BadgesList extends ScrollPane {
|
|||
private Badges.Badge badge;
|
||||
|
||||
private Image icon;
|
||||
private RenderedTextMultiline label;
|
||||
private RenderedTextBlock label;
|
||||
|
||||
public ListItem( Badges.Badge badge ) {
|
||||
super();
|
||||
|
@ -100,7 +100,7 @@ public class BadgesList extends ScrollPane {
|
|||
icon = new Image();
|
||||
add( icon );
|
||||
|
||||
label = PixelScene.renderMultiline( 6 );
|
||||
label = PixelScene.renderTextBlock( 6 );
|
||||
add( label );
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class GameLog extends Component implements Signal.Listener<String> {
|
|||
|
||||
private static final Pattern PUNCTUATION = Pattern.compile( ".*[.,;?! ]$" );
|
||||
|
||||
private RenderedTextMultiline lastEntry;
|
||||
private RenderedTextBlock lastEntry;
|
||||
private int lastColor;
|
||||
|
||||
private static ArrayList<Entry> entries = new ArrayList<>();
|
||||
|
@ -85,7 +85,7 @@ public class GameLog extends Component implements Signal.Listener<String> {
|
|||
|
||||
} else {
|
||||
|
||||
lastEntry = PixelScene.renderMultiline( text, 6 );
|
||||
lastEntry = PixelScene.renderTextBlock( text, 6 );
|
||||
lastEntry.hardlight( color );
|
||||
lastColor = color;
|
||||
add( lastEntry );
|
||||
|
@ -99,11 +99,11 @@ public class GameLog extends Component implements Signal.Listener<String> {
|
|||
do {
|
||||
nLines = 0;
|
||||
for (int i = 0; i < length-1; i++) {
|
||||
nLines += ((RenderedTextMultiline) members.get(i)).nLines;
|
||||
nLines += ((RenderedTextBlock) members.get(i)).nLines;
|
||||
}
|
||||
|
||||
if (nLines > MAX_LINES) {
|
||||
RenderedTextMultiline r = ((RenderedTextMultiline) members.get(0));
|
||||
RenderedTextBlock r = ((RenderedTextBlock) members.get(0));
|
||||
remove(r);
|
||||
r.destroy();
|
||||
|
||||
|
@ -125,7 +125,7 @@ public class GameLog extends Component implements Signal.Listener<String> {
|
|||
|
||||
private synchronized void recreateLines() {
|
||||
for (Entry entry : entries) {
|
||||
lastEntry = PixelScene.renderMultiline( entry.text, 6 );
|
||||
lastEntry = PixelScene.renderTextBlock( entry.text, 6 );
|
||||
lastEntry.hardlight( lastColor = entry.color );
|
||||
add( lastEntry );
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ public class GameLog extends Component implements Signal.Listener<String> {
|
|||
protected void layout() {
|
||||
float pos = y;
|
||||
for (int i=length-1; i >= 0; i--) {
|
||||
RenderedTextMultiline entry = (RenderedTextMultiline)members.get( i );
|
||||
RenderedTextBlock entry = (RenderedTextBlock)members.get( i );
|
||||
entry.maxWidth((int)width);
|
||||
entry.setPos(x, pos-entry.height());
|
||||
pos -= entry.height()+2;
|
||||
|
|
|
@ -35,9 +35,9 @@ public abstract class OptionSlider extends Component {
|
|||
|
||||
private PointerArea pointerArea;
|
||||
|
||||
private RenderedTextMultiline title;
|
||||
private RenderedTextMultiline minTxt;
|
||||
private RenderedTextMultiline maxTxt;
|
||||
private RenderedTextBlock title;
|
||||
private RenderedTextBlock minTxt;
|
||||
private RenderedTextBlock maxTxt;
|
||||
|
||||
//values are expressed internally as ints, but they can easily be interpreted as something else externally.
|
||||
private int minVal;
|
||||
|
@ -93,9 +93,9 @@ public abstract class OptionSlider extends Component {
|
|||
add( BG = Chrome.get(Chrome.Type.RED_BUTTON));
|
||||
BG.alpha(0.5f);
|
||||
|
||||
add(title = PixelScene.renderMultiline(9));
|
||||
add(this.minTxt = PixelScene.renderMultiline(6));
|
||||
add(this.maxTxt = PixelScene.renderMultiline(6));
|
||||
add(title = PixelScene.renderTextBlock(9));
|
||||
add(this.minTxt = PixelScene.renderTextBlock(6));
|
||||
add(this.maxTxt = PixelScene.renderTextBlock(6));
|
||||
|
||||
add(sliderBG = new ColorBlock(1, 1, 0xFF222222));
|
||||
sliderNode = Chrome.get(Chrome.Type.RED_BUTTON);
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.watabou.noosa.ui.Component;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class RenderedTextMultiline extends Component {
|
||||
public class RenderedTextBlock extends Component {
|
||||
|
||||
private int maxWidth = Integer.MAX_VALUE;
|
||||
public int nLines;
|
||||
|
@ -48,11 +48,11 @@ public class RenderedTextMultiline extends Component {
|
|||
private int hightlightColor = Window.TITLE_COLOR;
|
||||
private boolean highlightingEnabled = true;
|
||||
|
||||
public RenderedTextMultiline(int size){
|
||||
public RenderedTextBlock(int size){
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public RenderedTextMultiline(String text, int size){
|
||||
public RenderedTextBlock(String text, int size){
|
||||
this.size = size;
|
||||
text(text);
|
||||
}
|
|
@ -33,7 +33,7 @@ import com.watabou.noosa.ui.Button;
|
|||
public class StyledButton extends Button {
|
||||
|
||||
protected NinePatch bg;
|
||||
protected RenderedTextMultiline text;
|
||||
protected RenderedTextBlock text;
|
||||
protected Image icon;
|
||||
|
||||
public StyledButton(Chrome.Type type, String label ) {
|
||||
|
@ -46,7 +46,7 @@ public class StyledButton extends Button {
|
|||
bg = Chrome.get( type );
|
||||
addToBack( bg );
|
||||
|
||||
text = PixelScene.renderMultiline( size );
|
||||
text = PixelScene.renderTextBlock( size );
|
||||
text.text( label );
|
||||
add( text );
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public class Toast extends Component {
|
|||
|
||||
protected NinePatch bg;
|
||||
protected SimpleButton close;
|
||||
protected RenderedTextMultiline text;
|
||||
protected RenderedTextBlock text;
|
||||
|
||||
public Toast( String text ) {
|
||||
super();
|
||||
|
@ -57,7 +57,7 @@ public class Toast extends Component {
|
|||
};
|
||||
add( close );
|
||||
|
||||
text = PixelScene.renderMultiline(8);
|
||||
text = PixelScene.renderTextBlock(8);
|
||||
add( text );
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.ui.changelist;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.watabou.noosa.ColorBlock;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
|
||||
|
@ -32,10 +32,10 @@ public class ChangeInfo extends Component {
|
|||
|
||||
protected ColorBlock line;
|
||||
|
||||
private RenderedTextMultiline title;
|
||||
private RenderedTextBlock title;
|
||||
public boolean major;
|
||||
|
||||
private RenderedTextMultiline text;
|
||||
private RenderedTextBlock text;
|
||||
|
||||
private ArrayList<ChangeButton> buttons = new ArrayList<>();
|
||||
|
||||
|
@ -43,11 +43,11 @@ public class ChangeInfo extends Component {
|
|||
super();
|
||||
|
||||
if (majorTitle){
|
||||
this.title = PixelScene.renderMultiline( title, 9 );
|
||||
this.title = PixelScene.renderTextBlock( title, 9 );
|
||||
line = new ColorBlock( 1, 1, 0xFF222222);
|
||||
add(line);
|
||||
} else {
|
||||
this.title = PixelScene.renderMultiline( title, 6 );
|
||||
this.title = PixelScene.renderTextBlock( title, 6 );
|
||||
line = new ColorBlock( 1, 1, 0xFF333333);
|
||||
add(line);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class ChangeInfo extends Component {
|
|||
add(this.title);
|
||||
|
||||
if (text != null && !text.equals("")){
|
||||
this.text = PixelScene.renderMultiline(text, 6);
|
||||
this.text = PixelScene.renderTextBlock(text, 6);
|
||||
add(this.text);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HealthBar;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
|
@ -39,7 +39,7 @@ public class IconTitle extends Component {
|
|||
private static final float GAP = 2;
|
||||
|
||||
protected Image imIcon;
|
||||
protected RenderedTextMultiline tfLabel;
|
||||
protected RenderedTextBlock tfLabel;
|
||||
protected HealthBar health;
|
||||
|
||||
private float healthLvl = Float.NaN;
|
||||
|
@ -74,7 +74,7 @@ public class IconTitle extends Component {
|
|||
imIcon = new Image();
|
||||
add( imIcon );
|
||||
|
||||
tfLabel = PixelScene.renderMultiline( (int)FONT_SIZE );
|
||||
tfLabel = PixelScene.renderTextBlock( (int)FONT_SIZE );
|
||||
tfLabel.hardlight( Window.TITLE_COLOR );
|
||||
add( tfLabel );
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BadgeBanner;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.Image;
|
||||
|
||||
|
@ -42,7 +42,7 @@ public class WndBadge extends Window {
|
|||
add( icon );
|
||||
|
||||
//TODO: this used to be centered, should probably figure that out.
|
||||
RenderedTextMultiline info = PixelScene.renderMultiline( badge.desc(), 8 );
|
||||
RenderedTextBlock info = PixelScene.renderTextBlock( badge.desc(), 8 );
|
||||
info.maxWidth(WIDTH - MARGIN * 2);
|
||||
PixelScene.align(info);
|
||||
add(info);
|
||||
|
|
|
@ -54,7 +54,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.watabou.gltextures.TextureCache;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
import com.watabou.noosa.ColorBlock;
|
||||
|
@ -185,7 +185,7 @@ public class WndBag extends WndTabbed {
|
|||
|
||||
protected void placeTitle( Bag bag, int width ){
|
||||
|
||||
RenderedTextMultiline txtTitle = PixelScene.renderMultiline(
|
||||
RenderedTextBlock txtTitle = PixelScene.renderTextBlock(
|
||||
title != null ? Messages.titleCase(title) : Messages.titleCase( bag.name() ), 9 );
|
||||
txtTitle.hardlight( TITLE_COLOR );
|
||||
txtTitle.setPos(
|
||||
|
|
|
@ -31,7 +31,7 @@ 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.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.NinePatch;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
|
@ -60,7 +60,7 @@ public class WndBlacksmith extends Window {
|
|||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline message = PixelScene.renderMultiline( Messages.get(this, "prompt"), 6 );
|
||||
RenderedTextBlock message = PixelScene.renderTextBlock( Messages.get(this, "prompt"), 6 );
|
||||
message.maxWidth( WIDTH);
|
||||
message.setPos(0, titlebar.bottom() + GAP);
|
||||
add( message );
|
||||
|
|
|
@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.CheckBox;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.IconButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -50,7 +50,7 @@ public class WndChallenges extends Window {
|
|||
|
||||
this.editable = editable;
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline( Messages.get(this, "title"), 12 );
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 12 );
|
||||
title.hardlight( TITLE_COLOR );
|
||||
title.setPos(
|
||||
(WIDTH - title.width()) / 2,
|
||||
|
|
|
@ -27,7 +27,7 @@ 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.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
public class WndChooseWay extends Window {
|
||||
|
@ -46,7 +46,7 @@ public class WndChooseWay extends Window {
|
|||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline hl = PixelScene.renderMultiline( 6 );
|
||||
RenderedTextBlock hl = PixelScene.renderTextBlock( 6 );
|
||||
hl.text( way1.desc() + "\n\n" + way2.desc() + "\n\n" + Messages.get(this, "message"), WIDTH );
|
||||
hl.setPos( titlebar.left(), titlebar.bottom() + GAP );
|
||||
add( hl );
|
||||
|
|
|
@ -26,7 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.watabou.noosa.Group;
|
||||
|
||||
public class WndClass extends WndTabbed {
|
||||
|
@ -112,7 +112,7 @@ public class WndClass extends WndTabbed {
|
|||
pos += GAP;
|
||||
}
|
||||
|
||||
RenderedTextMultiline item = PixelScene.renderMultiline( "-" + items[i], 6 );
|
||||
RenderedTextBlock item = PixelScene.renderTextBlock( "-" + items[i], 6 );
|
||||
item.maxWidth((int)(WIDTH - MARGIN * 2 - dotWidth));
|
||||
item.setPos(0, pos);
|
||||
add( item );
|
||||
|
@ -155,7 +155,7 @@ public class WndClass extends WndTabbed {
|
|||
break;
|
||||
}
|
||||
|
||||
RenderedTextMultiline text = PixelScene.renderMultiline( 6 );
|
||||
RenderedTextBlock text = PixelScene.renderTextBlock( 6 );
|
||||
text.text( message, WIDTH - MARGIN * 2 );
|
||||
text.setPos( MARGIN, MARGIN );
|
||||
add( text );
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.journal.Document;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
|
@ -82,7 +82,7 @@ public class WndDocument extends Window {
|
|||
line.y = pos;
|
||||
content.add(line);
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline(doc.title(), 9);
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock(doc.title(), 9);
|
||||
title.hardlight(TITLE_COLOR);
|
||||
title.maxWidth( w - 2 );
|
||||
title.setPos( (w - title.width())/2f, pos + 1 + ((ITEM_HEIGHT) - title.height())/2f);
|
||||
|
@ -143,7 +143,7 @@ public class WndDocument extends Window {
|
|||
|
||||
private static class ListItem extends Component {
|
||||
|
||||
protected RenderedTextMultiline label;
|
||||
protected RenderedTextBlock label;
|
||||
protected BitmapText depth;
|
||||
protected ColorBlock line;
|
||||
protected Image icon;
|
||||
|
@ -172,7 +172,7 @@ public class WndDocument extends Window {
|
|||
|
||||
@Override
|
||||
protected void createChildren() {
|
||||
label = PixelScene.renderMultiline( 7 );
|
||||
label = PixelScene.renderTextBlock( 7 );
|
||||
add( label );
|
||||
|
||||
icon = new Image();
|
||||
|
|
|
@ -33,7 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.StartScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.ui.Button;
|
||||
|
@ -165,11 +165,11 @@ public class WndGameInProgress extends Window {
|
|||
|
||||
private void statSlot( String label, String value ) {
|
||||
|
||||
RenderedTextMultiline txt = PixelScene.renderMultiline( label, 8 );
|
||||
RenderedTextBlock txt = PixelScene.renderTextBlock( label, 8 );
|
||||
txt.setPos(0, pos);
|
||||
add( txt );
|
||||
|
||||
txt = PixelScene.renderMultiline( value, 8 );
|
||||
txt = PixelScene.renderTextBlock( value, 8 );
|
||||
txt.setPos(WIDTH * 0.6f, pos);
|
||||
PixelScene.align(txt);
|
||||
add( txt );
|
||||
|
|
|
@ -31,7 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.gltextures.SmartTexture;
|
||||
|
@ -127,11 +127,11 @@ public class WndHero extends WndTabbed {
|
|||
|
||||
private void statSlot( String label, String value ) {
|
||||
|
||||
RenderedTextMultiline txt = PixelScene.renderMultiline( label, 8 );
|
||||
RenderedTextBlock txt = PixelScene.renderTextBlock( label, 8 );
|
||||
txt.setPos(0, pos);
|
||||
add( txt );
|
||||
|
||||
txt = PixelScene.renderMultiline( value, 8 );
|
||||
txt = PixelScene.renderTextBlock( value, 8 );
|
||||
txt.setPos(WIDTH * 0.6f, pos);
|
||||
PixelScene.align(txt);
|
||||
add( txt );
|
||||
|
@ -197,7 +197,7 @@ public class WndHero extends WndTabbed {
|
|||
private Buff buff;
|
||||
|
||||
Image icon;
|
||||
RenderedTextMultiline txt;
|
||||
RenderedTextBlock txt;
|
||||
|
||||
public BuffSlot( Buff buff ){
|
||||
super();
|
||||
|
@ -210,7 +210,7 @@ public class WndHero extends WndTabbed {
|
|||
icon.y = this.y;
|
||||
add( icon );
|
||||
|
||||
txt = PixelScene.renderMultiline( buff.toString(), 8 );
|
||||
txt = PixelScene.renderTextBlock( buff.toString(), 8 );
|
||||
txt.setPos(
|
||||
icon.width + GAP,
|
||||
this.y + (icon.height - txt.height()) / 2
|
||||
|
|
|
@ -29,7 +29,7 @@ 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.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class WndImp extends Window {
|
|||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline message = PixelScene.renderMultiline( Messages.get(this, "message"), 6 );
|
||||
RenderedTextBlock message = PixelScene.renderTextBlock( Messages.get(this, "message"), 6 );
|
||||
message.maxWidth(WIDTH);
|
||||
message.setPos(0, titlebar.bottom() + GAP);
|
||||
add( message );
|
||||
|
|
|
@ -25,7 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.gltextures.SmartTexture;
|
||||
import com.watabou.gltextures.TextureCache;
|
||||
|
@ -58,7 +58,7 @@ public class WndInfoBuff extends Window {
|
|||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline txtInfo = PixelScene.renderMultiline(buff.desc(), 6);
|
||||
RenderedTextBlock txtInfo = PixelScene.renderTextBlock(buff.desc(), 6);
|
||||
txtInfo.maxWidth(WIDTH);
|
||||
txtInfo.setPos(titlebar.left(), titlebar.bottom() + GAP);
|
||||
add( txtInfo );
|
||||
|
|
|
@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTerrainTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.Image;
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class WndInfoCell extends Window {
|
|||
titlebar.setRect(0, 0, WIDTH, 0);
|
||||
add(titlebar);
|
||||
|
||||
RenderedTextMultiline info = PixelScene.renderMultiline(6);
|
||||
RenderedTextBlock info = PixelScene.renderTextBlock(6);
|
||||
add(info);
|
||||
|
||||
for (Blob blob:Dungeon.level.blobs.values()) {
|
||||
|
|
|
@ -26,7 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
public class WndInfoItem extends Window {
|
||||
|
@ -64,7 +64,7 @@ public class WndInfoItem extends Window {
|
|||
titlebar.setRect( 0, 0, width, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline txtInfo = PixelScene.renderMultiline( heap.info(), 6 );
|
||||
RenderedTextBlock txtInfo = PixelScene.renderTextBlock( heap.info(), 6 );
|
||||
txtInfo.maxWidth(width);
|
||||
txtInfo.setPos(titlebar.left(), titlebar.bottom() + GAP);
|
||||
add( txtInfo );
|
||||
|
@ -88,7 +88,7 @@ public class WndInfoItem extends Window {
|
|||
titlebar.setRect( 0, 0, width, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline txtInfo = PixelScene.renderMultiline( item.info(), 6 );
|
||||
RenderedTextBlock txtInfo = PixelScene.renderTextBlock( item.info(), 6 );
|
||||
txtInfo.maxWidth(width);
|
||||
txtInfo.setPos(titlebar.left(), titlebar.bottom() + GAP);
|
||||
add( txtInfo );
|
||||
|
|
|
@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HealthBar;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
|
||||
public class WndInfoMob extends WndTitledMessage {
|
||||
|
@ -43,13 +43,13 @@ public class WndInfoMob extends WndTitledMessage {
|
|||
private static final int GAP = 2;
|
||||
|
||||
private CharSprite image;
|
||||
private RenderedTextMultiline name;
|
||||
private RenderedTextBlock name;
|
||||
private HealthBar health;
|
||||
private BuffIndicator buffs;
|
||||
|
||||
public MobTitle( Mob mob ) {
|
||||
|
||||
name = PixelScene.renderMultiline( Messages.titleCase( mob.name ), 9 );
|
||||
name = PixelScene.renderTextBlock( Messages.titleCase( mob.name ), 9 );
|
||||
name.hardlight( TITLE_COLOR );
|
||||
add( name );
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -62,7 +62,7 @@ public class WndItem extends Window {
|
|||
|
||||
int width = WIDTH_MIN;
|
||||
|
||||
RenderedTextMultiline info = PixelScene.renderMultiline( item.info(), 6 );
|
||||
RenderedTextBlock info = PixelScene.renderTextBlock( item.info(), 6 );
|
||||
info.maxWidth(width);
|
||||
|
||||
//info box can go out of the screen on landscape, so widen it
|
||||
|
|
|
@ -39,7 +39,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickRecipe;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
import com.watabou.noosa.ColorBlock;
|
||||
|
@ -137,7 +137,7 @@ public class WndJournal extends WndTabbed {
|
|||
|
||||
private static class ListItem extends Component {
|
||||
|
||||
protected RenderedTextMultiline label;
|
||||
protected RenderedTextBlock label;
|
||||
protected BitmapText depth;
|
||||
protected ColorBlock line;
|
||||
protected Image icon;
|
||||
|
@ -166,7 +166,7 @@ public class WndJournal extends WndTabbed {
|
|||
|
||||
@Override
|
||||
protected void createChildren() {
|
||||
label = PixelScene.renderMultiline( 7 );
|
||||
label = PixelScene.renderTextBlock( 7 );
|
||||
add( label );
|
||||
|
||||
icon = new Image();
|
||||
|
@ -236,7 +236,7 @@ public class WndJournal extends WndTabbed {
|
|||
line.y = pos;
|
||||
content.add(line);
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline(Document.ADVENTURERS_GUIDE.title(), 9);
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock(Document.ADVENTURERS_GUIDE.title(), 9);
|
||||
title.hardlight(TITLE_COLOR);
|
||||
title.maxWidth( (int)width() - 2 );
|
||||
title.setPos( (width() - title.width())/2f, pos + 1 + ((ITEM_HEIGHT) - title.height())/2f);
|
||||
|
@ -302,7 +302,7 @@ public class WndJournal extends WndTabbed {
|
|||
private static int currentPageIdx = -1;
|
||||
|
||||
private IconTitle title;
|
||||
private RenderedTextMultiline body;
|
||||
private RenderedTextBlock body;
|
||||
|
||||
private ScrollPane list;
|
||||
private ArrayList<QuickRecipe> recipes = new ArrayList<>();
|
||||
|
@ -332,7 +332,7 @@ public class WndJournal extends WndTabbed {
|
|||
title.icon( new ItemSprite(ItemSpriteSheet.ALCH_PAGE));
|
||||
title.visible = false;
|
||||
|
||||
body = PixelScene.renderMultiline(6);
|
||||
body = PixelScene.renderTextBlock(6);
|
||||
|
||||
list = new ScrollPane(new Component());
|
||||
add(list);
|
||||
|
@ -491,7 +491,7 @@ public class WndJournal extends WndTabbed {
|
|||
line.y = pos;
|
||||
content.add(line);
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline(Messages.get(this, "keys"), 9);
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock(Messages.get(this, "keys"), 9);
|
||||
title.hardlight(TITLE_COLOR);
|
||||
title.maxWidth( (int)width() - 2 );
|
||||
title.setPos( (width() - title.width())/2f, pos + 1 + ((ITEM_HEIGHT) - title.height())/2f);
|
||||
|
@ -516,7 +516,7 @@ public class WndJournal extends WndTabbed {
|
|||
line.y = pos;
|
||||
content.add(line);
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline(Messages.get(this, "landmarks"), 9);
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock(Messages.get(this, "landmarks"), 9);
|
||||
title.hardlight(TITLE_COLOR);
|
||||
title.maxWidth( (int)width() - 2 );
|
||||
title.setPos( (width() - title.width())/2f, pos + 1 + ((ITEM_HEIGHT) - title.height())/2f);
|
||||
|
|
|
@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.ColorBlock;
|
||||
import com.watabou.noosa.Game;
|
||||
|
@ -115,7 +115,7 @@ public class WndLangs extends Window {
|
|||
add(separator);
|
||||
|
||||
//language info layout.
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline( Messages.titleCase(currLang.nativeName()) , 9 );
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.titleCase(currLang.nativeName()) , 9 );
|
||||
title.setPos( textLeft + (textWidth - title.width())/2f, 0 );
|
||||
title.hardlight(TITLE_COLOR);
|
||||
PixelScene.align(title);
|
||||
|
@ -123,14 +123,14 @@ public class WndLangs extends Window {
|
|||
|
||||
if (currLang == Languages.ENGLISH){
|
||||
|
||||
RenderedTextMultiline info = PixelScene.renderMultiline(6);
|
||||
RenderedTextBlock info = PixelScene.renderTextBlock(6);
|
||||
info.text("This is the source language, written by the developer.", width - textLeft);
|
||||
info.setPos(textLeft, title.bottom() + 4);
|
||||
add(info);
|
||||
|
||||
} else {
|
||||
|
||||
RenderedTextMultiline info = PixelScene.renderMultiline(6);
|
||||
RenderedTextBlock info = PixelScene.renderTextBlock(6);
|
||||
switch (currLang.status()) {
|
||||
case REVIEWED:
|
||||
info.text(Messages.get(this, "completed"), width - textLeft);
|
||||
|
@ -201,19 +201,19 @@ public class WndLangs extends Window {
|
|||
|
||||
int w = wide? 135 : 65;
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline(6);
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock(6);
|
||||
title.text(Messages.titleCase(Messages.get(WndLangs.class, "credits")) , w);
|
||||
title.hardlight(SHPX_COLOR);
|
||||
title.setPos((w - title.width())/2, 0);
|
||||
credits.add(title);
|
||||
|
||||
RenderedTextMultiline text = PixelScene.renderMultiline(5);
|
||||
RenderedTextBlock text = PixelScene.renderTextBlock(5);
|
||||
text.text(creds, 65);
|
||||
text.setPos(0, title.bottom() + 2);
|
||||
credits.add(text);
|
||||
|
||||
if (wide){
|
||||
RenderedTextMultiline rightColumn = PixelScene.renderMultiline(5);
|
||||
RenderedTextBlock rightColumn = PixelScene.renderTextBlock(5);
|
||||
rightColumn.text(creds2, 65);
|
||||
rightColumn.setPos(70, title.bottom() + 8.5f);
|
||||
credits.add(rightColumn);
|
||||
|
@ -227,7 +227,7 @@ public class WndLangs extends Window {
|
|||
creditsBtn.setPos(textLeft + (textWidth - creditsBtn.width()) / 2f, y - 18);
|
||||
add(creditsBtn);
|
||||
|
||||
RenderedTextMultiline transifex_text = PixelScene.renderMultiline(6);
|
||||
RenderedTextBlock transifex_text = PixelScene.renderTextBlock(6);
|
||||
transifex_text.text(Messages.get(this, "transifex"), width - textLeft);
|
||||
transifex_text.setPos(textLeft, creditsBtn.top() - 2 - transifex_text.height());
|
||||
add(transifex_text);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
public class WndList extends Window {
|
||||
|
@ -45,7 +45,7 @@ public class WndList extends Window {
|
|||
pos += GAP;
|
||||
}
|
||||
|
||||
RenderedTextMultiline item = PixelScene.renderMultiline( "-" + items[i], 6 );
|
||||
RenderedTextBlock item = PixelScene.renderTextBlock( "-" + items[i], 6 );
|
||||
item.setPos( MARGIN, pos );
|
||||
item.maxWidth(WIDTH - MARGIN*2);
|
||||
add( item );
|
||||
|
|
|
@ -23,7 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
public class WndMessage extends Window {
|
||||
|
@ -36,7 +36,7 @@ public class WndMessage extends Window {
|
|||
|
||||
super();
|
||||
|
||||
RenderedTextMultiline info = PixelScene.renderMultiline( text, 6 );
|
||||
RenderedTextBlock info = PixelScene.renderTextBlock( text, 6 );
|
||||
info.maxWidth((SPDSettings.landscape() ? WIDTH_L : WIDTH_P) - MARGIN * 2);
|
||||
info.setPos(MARGIN, MARGIN);
|
||||
add( info );
|
||||
|
|
|
@ -24,7 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
public class WndOptions extends Window {
|
||||
|
@ -40,13 +40,13 @@ public class WndOptions extends Window {
|
|||
|
||||
int width = SPDSettings.landscape() ? WIDTH_L : WIDTH_P;
|
||||
|
||||
RenderedTextMultiline tfTitle = PixelScene.renderMultiline( title, 9 );
|
||||
RenderedTextBlock tfTitle = PixelScene.renderTextBlock( title, 9 );
|
||||
tfTitle.hardlight( TITLE_COLOR );
|
||||
tfTitle.setPos(MARGIN, MARGIN);
|
||||
tfTitle.maxWidth(width - MARGIN * 2);
|
||||
add( tfTitle );
|
||||
|
||||
RenderedTextMultiline tfMesage = PixelScene.renderMultiline( 6 );
|
||||
RenderedTextBlock tfMesage = PixelScene.renderTextBlock( 6 );
|
||||
tfMesage.text(message, width - MARGIN * 2);
|
||||
tfMesage.setPos( MARGIN, tfTitle.top() + tfTitle.height() + MARGIN );
|
||||
add( tfMesage );
|
||||
|
|
|
@ -35,7 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BadgesList;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.ColorBlock;
|
||||
|
@ -211,11 +211,11 @@ public class WndRanking extends WndTabbed {
|
|||
|
||||
private float statSlot( Group parent, String label, String value, float pos ) {
|
||||
|
||||
RenderedTextMultiline txt = PixelScene.renderMultiline( label, 7 );
|
||||
RenderedTextBlock txt = PixelScene.renderTextBlock( label, 7 );
|
||||
txt.setPos(0, pos);
|
||||
parent.add( txt );
|
||||
|
||||
txt = PixelScene.renderMultiline( value, 7 );
|
||||
txt = PixelScene.renderTextBlock( value, 7 );
|
||||
txt.setPos(WIDTH * 0.7f, pos);
|
||||
PixelScene.align(txt);
|
||||
parent.add( txt );
|
||||
|
@ -295,7 +295,7 @@ public class WndRanking extends WndTabbed {
|
|||
|
||||
private ItemSlot slot;
|
||||
private ColorBlock bg;
|
||||
private RenderedTextMultiline name;
|
||||
private RenderedTextBlock name;
|
||||
|
||||
public ItemButton( Item item ) {
|
||||
|
||||
|
@ -322,7 +322,7 @@ public class WndRanking extends WndTabbed {
|
|||
slot = new ItemSlot();
|
||||
add( slot );
|
||||
|
||||
name = PixelScene.renderMultiline( 7 );
|
||||
name = PixelScene.renderTextBlock( 7 );
|
||||
add( name );
|
||||
|
||||
super.createChildren();
|
||||
|
|
|
@ -30,7 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.Game;
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class WndResurrect extends Window {
|
|||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
RenderedTextMultiline message = PixelScene.renderMultiline( Messages.get(this, "message"), 6 );
|
||||
RenderedTextBlock message = PixelScene.renderTextBlock( Messages.get(this, "message"), 6 );
|
||||
message.maxWidth(WIDTH);
|
||||
message.setPos(0, titlebar.bottom() + GAP);
|
||||
add( message );
|
||||
|
|
|
@ -31,7 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.FetidRatSprite;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollTricksterSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GreatCrabSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
|
||||
|
@ -46,22 +46,22 @@ public class WndSadGhost extends Window {
|
|||
super();
|
||||
|
||||
IconTitle titlebar = new IconTitle();
|
||||
RenderedTextMultiline message;
|
||||
RenderedTextBlock message;
|
||||
switch (type){
|
||||
case 1:default:
|
||||
titlebar.icon( new FetidRatSprite() );
|
||||
titlebar.label( Messages.get(this, "rat_title") );
|
||||
message = PixelScene.renderMultiline( Messages.get(this, "rat")+Messages.get(this, "give_item"), 6 );
|
||||
message = PixelScene.renderTextBlock( Messages.get(this, "rat")+Messages.get(this, "give_item"), 6 );
|
||||
break;
|
||||
case 2:
|
||||
titlebar.icon( new GnollTricksterSprite() );
|
||||
titlebar.label( Messages.get(this, "gnoll_title") );
|
||||
message = PixelScene.renderMultiline( Messages.get(this, "gnoll")+Messages.get(this, "give_item"), 6 );
|
||||
message = PixelScene.renderTextBlock( Messages.get(this, "gnoll")+Messages.get(this, "give_item"), 6 );
|
||||
break;
|
||||
case 3:
|
||||
titlebar.icon( new GreatCrabSprite());
|
||||
titlebar.label( Messages.get(this, "crab_title") );
|
||||
message = PixelScene.renderMultiline( Messages.get(this, "crab")+Messages.get(this, "give_item"), 6 );
|
||||
message = PixelScene.renderTextBlock( Messages.get(this, "crab")+Messages.get(this, "give_item"), 6 );
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.CheckBox;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.OptionSlider;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Toolbar;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Group;
|
||||
|
@ -197,7 +197,7 @@ public class WndSettings extends WndTabbed {
|
|||
public UITab(){
|
||||
super();
|
||||
|
||||
RenderedTextMultiline barDesc = PixelScene.renderMultiline(Messages.get(this, "mode"), 9);
|
||||
RenderedTextBlock barDesc = PixelScene.renderTextBlock(Messages.get(this, "mode"), 9);
|
||||
barDesc.setPos((WIDTH-barDesc.width())/2f, GAP_TINY);
|
||||
PixelScene.align(barDesc);
|
||||
add(barDesc);
|
||||
|
|
|
@ -40,7 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.ui.IconButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.ColorBlock;
|
||||
import com.watabou.noosa.Game;
|
||||
|
@ -59,7 +59,7 @@ public class WndStartGame extends Window {
|
|||
Badges.loadGlobal();
|
||||
Journal.loadGlobal();
|
||||
|
||||
RenderedTextMultiline title = PixelScene.renderMultiline(Messages.get(this, "title"), 12 );
|
||||
RenderedTextBlock title = PixelScene.renderTextBlock(Messages.get(this, "title"), 12 );
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.setPos( (WIDTH - title.width())/2f, 2);
|
||||
PixelScene.align(title);
|
||||
|
@ -227,7 +227,7 @@ public class WndStartGame extends Window {
|
|||
private IconButton heroMisc;
|
||||
private IconButton heroSubclass;
|
||||
|
||||
private RenderedTextMultiline name;
|
||||
private RenderedTextBlock name;
|
||||
|
||||
private static final int BTN_SIZE = 20;
|
||||
|
||||
|
@ -283,7 +283,7 @@ public class WndStartGame extends Window {
|
|||
heroSubclass.setSize(BTN_SIZE, BTN_SIZE);
|
||||
add(heroSubclass);
|
||||
|
||||
name = PixelScene.renderMultiline(12);
|
||||
name = PixelScene.renderTextBlock(12);
|
||||
add(name);
|
||||
|
||||
visible = false;
|
||||
|
|
|
@ -26,7 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.input.PointerEvent;
|
||||
import com.watabou.noosa.Game;
|
||||
|
@ -59,14 +59,14 @@ public class WndStory extends Window {
|
|||
CHAPTERS.put( ID_HALLS, "halls" );
|
||||
}
|
||||
|
||||
private RenderedTextMultiline tf;
|
||||
private RenderedTextBlock tf;
|
||||
|
||||
private float delay;
|
||||
|
||||
public WndStory( String text ) {
|
||||
super( 0, 0, Chrome.get( Chrome.Type.SCROLL ) );
|
||||
|
||||
tf = PixelScene.renderMultiline( text, 6 );
|
||||
tf = PixelScene.renderTextBlock( text, 6 );
|
||||
tf.maxWidth(SPDSettings.landscape() ?
|
||||
WIDTH_L - MARGIN * 2:
|
||||
WIDTH_P - MARGIN *2);
|
||||
|
|
|
@ -24,7 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Image;
|
||||
|
@ -196,7 +196,7 @@ public class WndTabbed extends Window {
|
|||
|
||||
protected class LabeledTab extends Tab {
|
||||
|
||||
private RenderedTextMultiline btLabel;
|
||||
private RenderedTextBlock btLabel;
|
||||
|
||||
public LabeledTab( String label ) {
|
||||
|
||||
|
@ -209,7 +209,7 @@ public class WndTabbed extends Window {
|
|||
protected void createChildren() {
|
||||
super.createChildren();
|
||||
|
||||
btLabel = PixelScene.renderMultiline( 9 );
|
||||
btLabel = PixelScene.renderTextBlock( 9 );
|
||||
add( btLabel );
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
|
@ -49,7 +49,7 @@ public class WndTitledMessage extends Window {
|
|||
titlebar.setRect( 0, 0, width, 0 );
|
||||
add(titlebar);
|
||||
|
||||
RenderedTextMultiline text = PixelScene.renderMultiline( 6 );
|
||||
RenderedTextBlock text = PixelScene.renderTextBlock( 6 );
|
||||
text.text( message, width );
|
||||
text.setPos( titlebar.left(), titlebar.bottom() + GAP );
|
||||
add( text );
|
||||
|
|
|
@ -35,7 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
public class WndTradeItem extends Window {
|
||||
|
@ -212,7 +212,7 @@ public class WndTradeItem extends Window {
|
|||
}
|
||||
|
||||
// Description
|
||||
RenderedTextMultiline info = PixelScene.renderMultiline( item.info(), 6 );
|
||||
RenderedTextBlock info = PixelScene.renderTextBlock( item.info(), 6 );
|
||||
info.maxWidth(WIDTH);
|
||||
info.setPos(titlebar.left(), titlebar.bottom() + GAP);
|
||||
add( info );
|
||||
|
|
|
@ -32,7 +32,7 @@ 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.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
|
||||
|
@ -61,7 +61,7 @@ public class WndWandmaker extends Window {
|
|||
msg = Messages.get(this, "berry");
|
||||
}
|
||||
|
||||
RenderedTextMultiline message = PixelScene.renderMultiline( msg, 6 );
|
||||
RenderedTextBlock message = PixelScene.renderTextBlock( msg, 6 );
|
||||
message.maxWidth(WIDTH);
|
||||
message.setPos(0, titlebar.bottom() + GAP);
|
||||
add( message );
|
||||
|
|
Loading…
Reference in New Issue
Block a user