mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-11 19:37:34 +00:00
text render fix
This commit is contained in:
1 file changed
+10
-3
@@ -251,11 +251,18 @@ public final class FormattedText {
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(FontRenderer renderer, int x, int y, boolean shadow) {
|
||||
x += renderer.drawString(text, x, y, colorMap.get(colorStyle).getRGB(), shadow);
|
||||
if (endLine)
|
||||
int startX = x;
|
||||
x = renderer.drawString(text, x, y, colorMap.get(colorStyle).getRGB(), shadow);
|
||||
if (endLine) {
|
||||
y += renderer.FONT_HEIGHT;
|
||||
x = startX;
|
||||
}
|
||||
for (val sibling: siblings) {
|
||||
x += renderer.drawString(sibling.text, x, y, colorMap.get(sibling.colorStyle).getRGB(), shadow);
|
||||
x = renderer.drawString(sibling.text, x, y, colorMap.get(sibling.colorStyle).getRGB(), shadow);
|
||||
if (sibling.endLine) {
|
||||
y += renderer.FONT_HEIGHT;
|
||||
x = startX;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user