From c1bd838883510117af02368a2bd0e960b4e8e749 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 11 Oct 2019 19:39:49 -0400 Subject: [PATCH] v0.7.5b: renamed RenderedTextMultiline to RenderedTextBlock --- .../android/windows/WndAndroidTextInput.java | 4 ++-- .../effects/FloatingText.java | 4 ++-- .../items/artifacts/DriedRose.java | 6 +++--- .../scrolls/exotic/ScrollOfDivination.java | 4 ++-- .../items/stones/StoneOfAugmentation.java | 4 ++-- .../items/stones/StoneOfIntuition.java | 4 ++-- .../scenes/AboutScene.java | 14 ++++++------- .../scenes/AlchemyScene.java | 14 ++++++------- .../scenes/AmuletScene.java | 6 +++--- .../scenes/BadgesScene.java | 4 ++-- .../scenes/ChangesScene.java | 4 ++-- .../scenes/InterlevelScene.java | 6 +++--- .../scenes/PixelScene.java | 20 +++++-------------- .../scenes/RankingsScene.java | 12 +++++------ .../scenes/StartScene.java | 8 ++++---- .../scenes/WelcomeScene.java | 4 ++-- .../shatteredpixeldungeon/ui/BadgesList.java | 4 ++-- .../shatteredpixeldungeon/ui/GameLog.java | 12 +++++------ .../ui/OptionSlider.java | 12 +++++------ ...tMultiline.java => RenderedTextBlock.java} | 6 +++--- .../ui/StyledButton.java | 4 ++-- .../shatteredpixeldungeon/ui/Toast.java | 4 ++-- .../ui/changelist/ChangeInfo.java | 12 +++++------ .../windows/IconTitle.java | 6 +++--- .../windows/WndBadge.java | 4 ++-- .../shatteredpixeldungeon/windows/WndBag.java | 4 ++-- .../windows/WndBlacksmith.java | 4 ++-- .../windows/WndChallenges.java | 4 ++-- .../windows/WndChooseWay.java | 4 ++-- .../windows/WndClass.java | 6 +++--- .../windows/WndDocument.java | 8 ++++---- .../windows/WndGameInProgress.java | 6 +++--- .../windows/WndHero.java | 10 +++++----- .../shatteredpixeldungeon/windows/WndImp.java | 4 ++-- .../windows/WndInfoBuff.java | 4 ++-- .../windows/WndInfoCell.java | 4 ++-- .../windows/WndInfoItem.java | 6 +++--- .../windows/WndInfoMob.java | 6 +++--- .../windows/WndItem.java | 4 ++-- .../windows/WndJournal.java | 16 +++++++-------- .../windows/WndLangs.java | 16 +++++++-------- .../windows/WndList.java | 4 ++-- .../windows/WndMessage.java | 4 ++-- .../windows/WndOptions.java | 6 +++--- .../windows/WndRanking.java | 10 +++++----- .../windows/WndResurrect.java | 4 ++-- .../windows/WndSadGhost.java | 10 +++++----- .../windows/WndSettings.java | 4 ++-- .../windows/WndStartGame.java | 8 ++++---- .../windows/WndStory.java | 6 +++--- .../windows/WndTabbed.java | 6 +++--- .../windows/WndTitledMessage.java | 4 ++-- .../windows/WndTradeItem.java | 4 ++-- .../windows/WndWandmaker.java | 4 ++-- 54 files changed, 176 insertions(+), 186 deletions(-) rename core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/{RenderedTextMultiline.java => RenderedTextBlock.java} (97%) diff --git a/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/windows/WndAndroidTextInput.java b/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/windows/WndAndroidTextInput.java index cf72cfad3..29f41eda9 100644 --- a/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/windows/WndAndroidTextInput.java +++ b/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/windows/WndAndroidTextInput.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java index e835726ec..6eba9ce21 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java @@ -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; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java index 923b581f5..43473593b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfDivination.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfDivination.java index 5e4b5e93c..415956b09 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfDivination.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfDivination.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfAugmentation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfAugmentation.java index f70e6a6b1..309f46db9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfAugmentation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfAugmentation.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java index 396bb71b0..331eabbde 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfIntuition.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java index 32d7877ee..dd8e36c1d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java index 20eb6aa45..0f9c3b219 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AlchemyScene.java @@ -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(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java index 6042ac187..df8897625 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java @@ -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 ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java index 4eb306d77..755b3fed1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java @@ -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, diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java index 862d2c633..aa8994459 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java @@ -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, diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java index e3d55fedb..4badc332e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java @@ -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 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java index ac4c13fc1..87510fb99 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java @@ -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; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java index a3659c855..2c0c8550f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java index 0e967462b..bb73ff07c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java @@ -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); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index 7f2fea8e5..4272a12e4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -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"); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java index 3ed2e43c3..b40fd6483 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java @@ -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 ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/GameLog.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/GameLog.java index 7fd41808e..9cb342277 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/GameLog.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/GameLog.java @@ -36,7 +36,7 @@ public class GameLog extends Component implements Signal.Listener { private static final Pattern PUNCTUATION = Pattern.compile( ".*[.,;?! ]$" ); - private RenderedTextMultiline lastEntry; + private RenderedTextBlock lastEntry; private int lastColor; private static ArrayList entries = new ArrayList<>(); @@ -85,7 +85,7 @@ public class GameLog extends Component implements Signal.Listener { } 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 { 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 { 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 { 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; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java index 029c36d0e..13b7dd922 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/OptionSlider.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextMultiline.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextBlock.java similarity index 97% rename from core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextMultiline.java rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextBlock.java index ffa106607..59b827ef2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextMultiline.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextBlock.java @@ -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); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StyledButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StyledButton.java index 3e2bf389c..e45736ae0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StyledButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StyledButton.java @@ -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 ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java index 40bbe77fa..45e1d2246 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java @@ -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 ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/ChangeInfo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/ChangeInfo.java index 54a3c90ce..6610b9664 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/ChangeInfo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/ChangeInfo.java @@ -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 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); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java index 0a24eb254..d3f37579a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java index e4a7f1306..a21c081eb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java index 927f246a1..737bd3c9a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java @@ -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( diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java index d96d116a5..8cc679c31 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBlacksmith.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java index 7c99edd93..f632ace4d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java @@ -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, diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseWay.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseWay.java index f30830562..cfa668596 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseWay.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseWay.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndClass.java index 5ba6a36c1..dcc67f69e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndClass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndClass.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndDocument.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndDocument.java index e5305d907..81114bf51 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndDocument.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndDocument.java @@ -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(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGameInProgress.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGameInProgress.java index 3e69266f3..5f2c5129e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGameInProgress.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGameInProgress.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java index 0b540fe2a..23d1ca024 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java @@ -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 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java index d1fc825a2..3cb8768a4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndImp.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoBuff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoBuff.java index 29e4a2c9f..bd7c83faa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoBuff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoBuff.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java index b39a1c525..3132224fa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoCell.java @@ -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()) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java index 559ae8b5e..7cc2cceb7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoItem.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java index 71e8dacc3..777a9b565 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java index d053c2c86..c8f027a2e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndItem.java @@ -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 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java index 3b2abb005..a54384788 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java @@ -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 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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndLangs.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndLangs.java index 5d77b75c3..53bc2957d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndLangs.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndLangs.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndList.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndList.java index 1f43bee77..54c6b31e5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndList.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndList.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java index 433cb87d4..a4f9a90b2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndMessage.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java index 7e327fee8..35ca807cd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java index 6e8dc575b..3bb78345f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java @@ -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(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java index 24f03d54f..d1aa74389 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java index 668bf5541..fbd9cc165 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java @@ -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; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java index 42e04711b..53154c207 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java index 06a5cc79c..71f019689 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java @@ -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; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java index 718ff7565..2c199388d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java @@ -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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java index 2d678ef92..6f7ca5bf5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java @@ -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 ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTitledMessage.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTitledMessage.java index 2595337ef..2d57a6cb8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTitledMessage.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTitledMessage.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java index d8bf0fdbb..e8732b14a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndTradeItem.java @@ -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 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java index 5a533cca6..30237b3bf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndWandmaker.java @@ -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 );