mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-14 01:04:12 +00:00
take the mod name
This commit is contained in:
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. */
|
||||
|
||||
Reference in new issue
Block a user