Merge pull request #292 from postyizhan: adapt quest tracker height to content

This commit is contained in:
KAMKEEL committed 2026-08-11 05:22:35 -04:00
commit a71532f49a
1 file changed
+14
@@ -39,6 +39,7 @@ public class QuestTrackingComponent extends HudComponent {
if (turnIn != null && !turnIn.isEmpty()) {
turnInLines.add(convertColorCodes(turnIn));
}
updateOverlayHeight();
}
/**
@@ -239,6 +240,19 @@ public class QuestTrackingComponent extends HudComponent {
}
// ---------- Helper rendering methods ----------- (methods unchanged) ...
private void updateOverlayHeight() {
int lineHeight = mc.fontRenderer.FONT_HEIGHT + 4;
int contentHeight = 5;
contentHeight += questTitleLines.size() * lineHeight + 8;
contentHeight += questCategoryLines.size() * lineHeight + 8;
contentHeight += objectiveLines.size() * lineHeight;
if (!turnInLines.isEmpty()) {
contentHeight += 8;
}
contentHeight += turnInLines.size() * lineHeight;
overlayHeight = contentHeight;
}
private int renderTextBlock(List<String> lines, int startY, int align, int color) {
int y = startY;
FontRenderer font = mc.fontRenderer;