diff options
author | syeyoung <cyoung06@naver.com> | 2023-01-25 18:40:09 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2023-01-25 18:40:09 +0900 |
commit | 93115f34f8b91a6bec0ec4f32d8fddc610d930e6 (patch) | |
tree | ba564ca41f2b35c953b73c12e307314443850ccf /mod/src/main/java/kr | |
parent | 2c9e03a56995baba5953b5361eaca7c077ddcfca (diff) | |
download | Skyblock-Dungeons-Guide-93115f34f8b91a6bec0ec4f32d8fddc610d930e6.tar.gz Skyblock-Dungeons-Guide-93115f34f8b91a6bec0ec4f32d8fddc610d930e6.tar.bz2 Skyblock-Dungeons-Guide-93115f34f8b91a6bec0ec4f32d8fddc610d930e6.zip |
- Fix richtext not incorporating top ascent to render stuff
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod/src/main/java/kr')
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/guiv2/elements/richtext/RichText.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/guiv2/elements/richtext/RichText.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/guiv2/elements/richtext/RichText.java index cc651a9d..3dc58c7e 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/guiv2/elements/richtext/RichText.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/guiv2/elements/richtext/RichText.java @@ -120,7 +120,6 @@ public class RichText extends Widget implements Layouter, Renderer { richLines = lines; - return new Size(takeAllSpace ? constraintBox.getMaxWidth() : maxWidth, sumHeight); } @@ -208,7 +207,8 @@ public class RichText extends Widget implements Layouter, Renderer { x = 0; for (FlatTextSpan lineElement : richLine.getLineElements()) { lineElement.textStyle.getFontRenderer() - .render(lineElement, x, y + richLine.getBaseline() - lineElement.getBaseline(), currentScale); + .render(lineElement, x, y + richLine.getBaseline() - lineElement.getBaseline() + + lineElement.textStyle.getTopAscent() * lineElement.textStyle.getSize(), currentScale); x += lineElement.getWidth(); } y += richLine.getHeight(); |