Skip to content

Commit 3f01caa

Browse files
committed
text margin fix
1 parent e128e6d commit 3f01caa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

blade-engine/src/org/bladecoder/engine/util/TextUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ public static float getSubtitleY(BitmapFont font, String str, int viewportHeigh
121121
}
122122

123123
public static float getSubtitleY(BitmapFont font, String str, float maxLength, int viewportHeight) {
124+
TextBounds b = font.getWrappedBounds(str, maxLength);
124125

125-
float y = viewportHeight - viewportHeight/8;
126+
float y = viewportHeight - b.height - DPIUtils.getMarginSize() * 4;
126127

127128
return y;
128129
}

0 commit comments

Comments
 (0)