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 ff202c12b..6ea0bd734 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java @@ -30,7 +30,7 @@ import com.watabou.noosa.Image; public class WndBadge extends Window { - private static final int WIDTH = 120; + private static final int MAX_WIDTH = 125; private static final int MARGIN = 4; public WndBadge( Badges.Badge badge, boolean unlocked ) { @@ -43,12 +43,14 @@ public class WndBadge extends Window { add( icon ); RenderedTextBlock title = PixelScene.renderTextBlock( badge.title(), 9 ); + title.maxWidth(MAX_WIDTH - MARGIN * 2); + title.align(RenderedTextBlock.CENTER_ALIGN); title.hardlight(TITLE_COLOR); if (!unlocked) title.hardlight( 0x888822 ); add(title); RenderedTextBlock info = PixelScene.renderTextBlock( badge.desc(), 6 ); - info.maxWidth(WIDTH - MARGIN * 2); + info.maxWidth(MAX_WIDTH - MARGIN * 2); info.align(RenderedTextBlock.CENTER_ALIGN); if (!unlocked) info.hardlight( 0x888888 ); add(info);