Skip to content

feat(hud): add an option to keep HUD previews out of the main menu - #1389

Open
Zoobooo wants to merge 2 commits into
Polyfrost:v1from
Zoobooo:fix/menu-hud-previews
Open

Zoobooo wants to merge 2 commits 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) puts every HUD into preview mode, because HudManager.isEditing is isEditorOpen || isConfigUiOpen. While only the menu is open, every HUD shows demo content, hidden HUDs show at 35% opacity, HudDragLayer draws outlines and the hover action bar behind the menu, and mods that read isEditing (Chatting, for example) draw their own edit visuals over it.

This stays the default. The PR adds an Edit HUDs From the Menu switch under Preferences > HUD Editor so users can opt out.

  • On (default): nothing changes from current behavior
  • Off: HUDs behind the menu render live like behind any other screen, without previews, outlines or the drag layer. Editing only happens in the HUD editor

Changes:

  • HudManager.previewInConfigUi (internal, synced from the new OneConfigConfig.hudPreviewsInMenu switch) and HudManager.isConfigUiPreviewing (isConfigUiOpen && previewInConfigUi)
  • isEditing, showingPreviews, OneConfig.prepareHud / submitHud and the OneConfigUIScreen legacy HUD underlay now check isConfigUiPreviewing instead of isConfigUiOpen
  • the main menu only composes HudDragLayer while the switch is on
  • the search keybind still uses isConfigUiOpen, so it works in the menu either way
  • new HudFrameCacheTest.menuWithoutPreviewsKeepsCacheOn checks that the menu alone keeps the geometry cache on with the switch off
  • hud.api updated for the new public isConfigUiPreviewing getter
  • CHANGELOG.md entry under Unreleased

Tested in game on 1.8.9 (Ornithe) with the switch on and off.

Related Issue(s)

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: added the switch and isConfigUiPreviewing to CHANGELOG.md under Unreleased
  • I made sure these changes are backwards compatible: with the switch on (default) behavior is unchanged. With it off, isEditing returns false while only the menu is open, so mods that use it to show previews behind the menu show live content there instead
  • This pull request is for one feature/bug fix

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.

@Tellinq

Tellinq commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Hey, I know this might not be the behavior that you were looking for, but the behavior you're describing as an issue is actually the intended and better behavior. It is intentional that HUD previews and HUD moving is available in the main mod menu, so users don't have to go back and forth if all they need to do is a quick move, or can avoid an extra click to get to a specific settings menu if not blocked. This PR would actually be seen as a regression.

I would not recommend having this PR merged with this current behavior. If there is a legitimate reason why you want this undone, this needs to have further discussion, but quick HUD editing and settings action menus should stay accessible when reachable in the main mod menu.

@awruff

awruff commented Nov 20, 2026

Copy link
Copy Markdown
Member

The current behavior is the intended behavior

@lunaynx
lunaynx force-pushed the v1 branch 4 times, most recently from 6fea82e to d7a54ab Compare November 20, 2026 18:18
@Tellinq

Tellinq commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

If you insist on having this, please make the current behavior in upstream the default, and have an option to opt out so then once that is done, your behavior in this PR is what’s expected

This will fulfill #1397 and #1353 (also “None filed” is inaccurate, make sure those are listed)

Adds an "Edit HUDs From the Menu" switch to the HUD editor preferences. It is on by default and keeps the current behavior. When turned off, HUDs behind the main OneConfig menu render live like behind any other screen, without previews, outlines or the drag layer, and editing only happens in the HUD editor.
@Zoobooo
Zoobooo force-pushed the fix/menu-hud-previews branch from 0acbc4b to 11a5dc1 Compare November 21, 2026 23:34
@Zoobooo Zoobooo changed the title fix(hud): only show HUD previews in the HUD editor, not the main menu feat(hud): add an option to keep HUD previews out of the main menu Nov 21, 2026
@Zoobooo

Zoobooo commented Nov 21, 2026

Copy link
Copy Markdown
Author

I still think it looks pretty bad having HUD previews and outlines sitting behind the menu, but if that's what you want as the default, that's fine with me.

I've reworked the PR so the current behavior stays the default, and added an "Edit HUDs From the Menu" switch under Preferences > HUD Editor. With it on, nothing changes from upstream. With it off, HUDs behind the menu render live like behind any other screen, and editing only happens in the HUD editor.

Also linked #1397 and #1353 in the description.

@Tellinq

Tellinq commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Ok, the option is fine, and thanks for the rest of that! However...

...how much has this actually been tested? Right away, I'm encountering that you have to exit and re-enter the menu for this to take effect, and even then there are visual discrepancies while toggling....

output.mp4

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.

3 participants