mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-12 00:07:33 +00:00
Add fontRenderer parameter to drawMultilineTip
This commit is contained in:
1 parent
16f0b50920
commit
42b022af2a
1 file changed
+6
-2
@@ -158,6 +158,10 @@ public class GuiDraw
|
||||
}
|
||||
|
||||
public static void drawMultilineTip(int x, int y, List<String> list) {
|
||||
drawMultilineTip(fontRenderer, x, y, list);
|
||||
}
|
||||
|
||||
public static void drawMultilineTip(FontRenderer font, int x, int y, List<String> list) {
|
||||
if (list.isEmpty())
|
||||
return;
|
||||
|
||||
@@ -172,7 +176,7 @@ public class GuiDraw
|
||||
ITooltipLineHandler line = getTipLine(s);
|
||||
Dimension d = line != null ?
|
||||
line.getSize() :
|
||||
new Dimension(getStringWidth(s), list.get(i).endsWith(TOOLTIP_LINESPACE) && i + 1 < list.size() ? 12 : 10);
|
||||
new Dimension(font.getStringWidth(s), list.get(i).endsWith(TOOLTIP_LINESPACE) && i + 1 < list.size() ? 12 : 10);
|
||||
w = Math.max(w, d.width);
|
||||
h += d.height;
|
||||
}
|
||||
@@ -193,7 +197,7 @@ public class GuiDraw
|
||||
y += line.getSize().height;
|
||||
}
|
||||
else {
|
||||
fontRenderer.drawStringWithShadow(s, x, y, -1);
|
||||
font.drawStringWithShadow(s, x, y, -1);
|
||||
y += s.endsWith(TOOLTIP_LINESPACE) ? 12 : 10;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user