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 7d6bac4f6..debf9137c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java @@ -218,8 +218,11 @@ public class WndHero extends WndTabbed { RenderedTextBlock txt = PixelScene.renderTextBlock( label, 8 ); txt.setPos(0, pos); add( txt ); - - txt = PixelScene.renderTextBlock( value, 8 ); + + int size = 8; + if (value.length() >= 14) size -=2; + if (value.length() >= 18) size -=1; + txt = PixelScene.renderTextBlock( value, size ); txt.setPos(WIDTH * 0.55f, pos); PixelScene.align(txt); add( txt ); 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 da8045bf1..6bb8ec007 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java @@ -301,9 +301,12 @@ public class WndRanking extends WndTabbed { RenderedTextBlock txt = PixelScene.renderTextBlock( label, 7 ); txt.setPos(0, pos); parent.add( txt ); - - txt = PixelScene.renderTextBlock( value, 7 ); - txt.setPos(WIDTH * 0.6f, pos); + + int size = 7; + if (value.length() >= 14) size -=1; + if (value.length() >= 18) size -=1; + txt = PixelScene.renderTextBlock( value, size ); + txt.setPos(WIDTH * 0.55f, pos); PixelScene.align(txt); parent.add( txt );