Skip to content

Commit

Permalink
Second Fix
Browse files Browse the repository at this point in the history
Courtesy of Crosby, force hud elements to be rendered/ticked properly if the hud editor is open
  • Loading branch information
machiecodes committed Jan 14, 2025
1 parent 65a912c commit b121684
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ private void onTick(TickEvent.Post event) {
if (!(active || HudEditorScreen.isOpen())) return;

for (HudElement element : elements) {
element.tick(HudRenderer.INSTANCE);
if (element.isActive() || element.isInEditor()) {
element.tick(HudRenderer.INSTANCE);
}
}
}

Expand All @@ -233,7 +235,9 @@ private void onRender(Render2DEvent event) {
for (HudElement element : elements) {
element.updatePos();

if (element.isActive()) element.render(HudRenderer.INSTANCE);
if (element.isActive() || element.isInEditor()) {
element.render(HudRenderer.INSTANCE);
}
}

HudRenderer.INSTANCE.end();
Expand Down

0 comments on commit b121684

Please sign in to comment.