diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/internal/hud')
| -rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java b/src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java new file mode 100644 index 0000000..7c92799 --- /dev/null +++ b/src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java @@ -0,0 +1,22 @@ +package cc.polyfrost.oneconfig.internal.hud; + +import cc.polyfrost.oneconfig.events.event.HudRenderEvent; +import cc.polyfrost.oneconfig.hud.BasicHud; +import gg.essential.universal.UResolution; +import me.kbrewster.eventbus.Subscribe; + +import java.util.ArrayList; + +public class HudCore { + public static ArrayList<BasicHud> huds = new ArrayList<>(); + public static boolean editing = false; + + @Subscribe + public void onRender(HudRenderEvent event) { + if (editing) return; + for (BasicHud hud : huds) { + if (hud.enabled) + hud.drawAll(hud.getXScaled(UResolution.getScaledWidth()), hud.getYScaled(UResolution.getScaledHeight()), hud.scale, true); + } + } +} |
