Skip to content

fix(hud): only show HUD previews in the HUD editor, not the main menu - #1389

Open
Zoobooo wants to merge 1 commit into
Polyfrost:v1from
Zoobooo:fix/menu-hud-previews
Open

Zoobooo wants to merge 1 commit into
Polyfrost:v1from
Zoobooo:fix/menu-hud-previews

Conversation

@Zoobooo

@Zoobooo Zoobooo commented Nov 19, 2026

Copy link
Copy Markdown

Description

Opening the OneConfig menu (Right Shift) currently puts every HUD into preview mode, because HudManager.isEditing is isEditorOpen || isConfigUiOpen. While only the menu is open:

  • every HUD shows demo content, and hidden HUDs show at 35% opacity
  • HudDragLayer draws an outline around every HUD behind the menu and shows the hover action bar
  • mods that read isEditing draw their own edit visuals too. Chatting, for example, draws its chat window edit box and preview lines over the menu

This makes the menu look like a half-open HUD editor, and the HUD outlines overlap the menu panel.

This PR keeps preview and edit mode in the HUD editor only:

  • HudManager.isEditing (and the internal showingPreviews) now only follow isEditorOpen
  • the main menu no longer composes HudDragLayer, and OneConfigUIScreen no longer draws legacy HUDs as its own underlay
  • OneConfig.prepareHud / submitHud no longer special-case isConfigUiOpen, so HUDs behind the menu go through the normal live render path, like behind any other screen. overrideShowInScreens is unchanged, so HUDs still show behind the menu
  • HudFrameCacheTest.cacheStaysOnWithScreenOpenUntilEditing now checks that the menu alone keeps the geometry cache on

Opening the HUD editor (Right Shift again in the menu, or Edit HUD) works as before.

Built the 1.8.9 (Ornithe) jar. Not yet tested in game.

Related Issue(s)

None filed.

Checklist

  • I made a clear description of what was changed
  • I stated why these changes were necessary
  • I updated documentation or said what needs to be updated: the changelog needs an entry, and the 1.8.0 entry "Drag HUD elements directly in the OneConfig UI" no longer applies
  • I made sure these changes are backwards compatible: no signatures change, but isEditing now returns false while only the menu is open. Mods that relied on it to show previews behind the menu will show live content there instead
  • This pull request is for one feature/bug fix

HudDragLayer is now unused. I left it in place in case you want to keep it for later, happy to remove it.

Note: on v1 without this change, 4 tests in :modules:hud already fail for me (HudDeletionPersistenceTest, 3 in HudProfileIsolationTest). They fail the same way with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant