take the mod name

This commit is contained in:
Ranzu committed 2026-11-02 16:11:02 +01:00
1 parent 130bea079b
commit 144259660c
2 files changed
+9 -2

No files matched your search

@@ -42,7 +42,9 @@ public final class DashboardHud {
HudRegistry.register(INFO_BOX);
}
static boolean beginBox(int x, int y, int width, int height) {
/** The mod that drew the box, if not Waila, is shown next to Waila's name in the editor. */
static boolean beginBox(String drawnBy, int x, int y, int width, int height) {
INFO_BOX.setModNameAddon(drawnBy);
boxDrawn = true;
boxX = x;
boxY = y;
@@ -49,7 +49,12 @@ public class OverlayRenderer {
* {@link #endBox()}.
*/
public static boolean beginBox(int x, int y, int width, int height) {
return !LoadedMods.DASHBOARD || DashboardHud.beginBox(x, y, width, height);
return beginBox(null, x, y, width, height);
}
/** Like {@link #beginBox(int, int, int, int)}, for a mod that draws the box itself, so a HUD editor can name it. */
public static boolean beginBox(String drawnBy, int x, int y, int width, int height) {
return !LoadedMods.DASHBOARD || DashboardHud.beginBox(drawnBy, x, y, width, height);
}
/** Call right after drawing the info box, only if {@link #beginBox} returned true. */