v0.3.4: implemented rendered text in all single-line cases

This commit is contained in:
Evan Debenham
2016-01-13 00:53:17 -05:00
committed by Evan Debenham
parent dc70009ae6
commit 13d6beda67
19 changed files with 115 additions and 134 deletions
@@ -50,9 +50,9 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
import com.watabou.gltextures.TextureCache;
import com.watabou.noosa.BitmapText;
import com.watabou.noosa.ColorBlock;
import com.watabou.noosa.Image;
import com.watabou.noosa.RenderedText;
import com.watabou.noosa.audio.Sample;
public class WndBag extends WndTabbed {
@@ -113,9 +113,8 @@ public class WndBag extends WndTabbed {
int slotsWidth = SLOT_SIZE * nCols + SLOT_MARGIN * (nCols - 1);
int slotsHeight = SLOT_SIZE * nRows + SLOT_MARGIN * (nRows - 1);
BitmapText txtTitle = PixelScene.createText( title != null ? title : Utils.capitalize( bag.name() ), 9 );
RenderedText txtTitle = PixelScene.renderText( title != null ? title : Utils.capitalize( bag.name() ), 9 );
txtTitle.hardlight( TITLE_COLOR );
txtTitle.measure();
txtTitle.x = (int)(slotsWidth - txtTitle.width()) / 2;
txtTitle.y = (int)(TITLE_HEIGHT - txtTitle.height()) / 2;
add( txtTitle );