Skip to content

Commit

Permalink
Show Vanilla HUD if hidden when in the Meteor HUD editor (#5077)
Browse files Browse the repository at this point in the history
  • Loading branch information
machiecodes authored Jan 3, 2025
1 parent 42ab944 commit b67a9b4
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main/java/meteordevelopment/meteorclient/MeteorClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import meteordevelopment.meteorclient.gui.tabs.Tabs;
import meteordevelopment.meteorclient.systems.Systems;
import meteordevelopment.meteorclient.systems.config.Config;
import meteordevelopment.meteorclient.systems.hud.screens.HudEditorScreen;
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.misc.DiscordPresence;
Expand Down Expand Up @@ -172,13 +173,16 @@ private void toggleGui() {

@EventHandler(priority = EventPriority.LOWEST)
private void onOpenScreen(OpenScreenEvent event) {
boolean hideHud = GuiThemes.get().hideHUD();

if (hideHud) {
if (event.screen instanceof WidgetScreen) {
if (!wasWidgetScreen) wasHudHiddenRoot = mc.options.hudHidden;

if (event.screen instanceof WidgetScreen) mc.options.hudHidden = true;
else if (!wasHudHiddenRoot) mc.options.hudHidden = false;
if (GuiThemes.get().hideHUD() || wasHudHiddenRoot) {
// Always show the MC HUD in the HUD editor screen since people like
// to align some items with the hotbar or chat
mc.options.hudHidden = !(event.screen instanceof HudEditorScreen);
}
} else {
if (wasWidgetScreen) mc.options.hudHidden = wasHudHiddenRoot;
wasHudHiddenRoot = mc.options.hudHidden;
}

wasWidgetScreen = event.screen instanceof WidgetScreen;
Expand Down

0 comments on commit b67a9b4

Please sign in to comment.