v0.3.4: switched to rendered text in a bunch of places

This commit is contained in:
Evan Debenham
2016-01-14 01:26:36 -05:00
committed by Evan Debenham
parent 82da647534
commit 8e508ab040
19 changed files with 130 additions and 183 deletions
@@ -21,7 +21,6 @@
package com.shatteredpixel.shatteredpixeldungeon.scenes;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.noosa.BitmapTextMultiline;
import com.watabou.noosa.Camera;
import com.watabou.noosa.Game;
import com.watabou.noosa.Image;
@@ -31,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ResultDescriptions;
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.watabou.noosa.RenderedTextMultiline;
import com.watabou.utils.Random;
public class AmuletScene extends PixelScene {
@@ -48,11 +48,10 @@ public class AmuletScene extends PixelScene {
public void create() {
super.create();
BitmapTextMultiline text = null;
RenderedTextMultiline text = null;
if (!noText) {
text = createMultiline( Messages.get(this, "text"), 8 );
text.maxWidth = WIDTH;
text.measure();
text = renderMultiline( Messages.get(this, "text"), 8 );
text.maxWidth(WIDTH);
add( text );
}
@@ -94,11 +93,10 @@ public class AmuletScene extends PixelScene {
amulet.x = (Camera.main.width - amulet.width) / 2;
amulet.y = (Camera.main.height - height) / 2;
text.setPos((Camera.main.width - text.width()) / 2, amulet.y + amulet.height + LARGE_GAP);
text.x = (Camera.main.width - text.width()) / 2;
text.y = amulet.y + amulet.height + LARGE_GAP;
btnExit.setPos( (Camera.main.width - btnExit.width()) / 2, text.y + text.height() + LARGE_GAP );
btnExit.setPos( (Camera.main.width - btnExit.width()) / 2, text.top() + text.height() + LARGE_GAP );
btnStay.setPos( btnExit.left(), btnExit.bottom() + SMALL_GAP );
}