From b67a9b42de8287a965a72af4d3d6286596b5a320 Mon Sep 17 00:00:00 2001 From: MachieCodes <80427814+machiecodes@users.noreply.github.com> Date: Thu, 2 Jan 2025 18:58:21 -0600 Subject: [PATCH] Show Vanilla HUD if hidden when in the Meteor HUD editor (#5077) --- .../meteorclient/MeteorClient.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/meteordevelopment/meteorclient/MeteorClient.java b/src/main/java/meteordevelopment/meteorclient/MeteorClient.java index e6704a22d0..c5b383c4d4 100644 --- a/src/main/java/meteordevelopment/meteorclient/MeteorClient.java +++ b/src/main/java/meteordevelopment/meteorclient/MeteorClient.java @@ -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; @@ -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;