fix(mods): hideGameHud() hides the text boxes and the ocarina screen too #3236
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3236
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/Longshot:fix/hidegamehud-messages-ocarina"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
A mod's
hideGameHud()leaves the game's text box and the ocarina screen on screen, so a photo mode's pictures takenmid-conversation or while playing the ocarina still show them. The modding docs say the call hides the text boxes. The
mod author on Discord who asked for the minimap fix (#3154) asked for these too.
See it on main: run a mod that calls
hideGameHud()and talk to someone (the repository savekokiri-start: walk outof Link's house to Saria). The hearts and the button prompts go away; the text box and the speaker's name stay. Take
out the ocarina: its button bar, staff and songbook stay too.
Why: they are not drawn on the 2D layer
hideGameHud()hides (#3154 found the game has four, and the call hides thefirst).
The fix: while a mod holds the hide, these screens' drawing is shrunk to nothing during their update and put back
right after it, the way the HUD toggle hides the gameplay HUD (#1855, futondestroyer's) and #3154 hides the minimap. The
screens: the text box (
MessageDialogScreen), its speaker's name (UIDemoNicknameScreen), the message screens(
UIMessageInGameScreen,UIMessageDemoScreen,UIBalloonMessageScreen,UITalkScreen) andUIOcarinaScreen. Theirinput still runs: the player advances the text and plays the ocarina, unseen. The system window is left alone. Nothing
is written to the save or the settings.
The conversation log (last two commits): on main, a log opened during a hide shows nothing, and its blurred backdrop
stays black until it is opened again with the HUD shown. The log and its backdrop are drawn on the hidden 2D layer, and
the backdrop is a picture the log takes as the player presses its button, before the log shows: letting the layer go
as the log shows was too late (tried in the game, both at the frame's start and in the log's own update). So while a
mod hides the HUD, the layer is let go for the whole conversation (while the log's screen updates) and hidden again
once it is over, and what the HUD draws on it meanwhile is hidden screen by screen: the gameplay HUD (the HUD toggle's
screens), the HUD's other screens while the layer is let go (the lock-on, counters, timer, item pop-up, tips, pointer,
enemy name, skip prompt), and the log's own screen while it is closed or closing, when it draws the text box's button
guide ("Hide", "Conversation Log"). The log the player opens shows as usual, its text included.
The docs now name what is hidden, and what a hide does to the conversation log.
Read first:
hud_update_beginingame/mods/widescreen/src/screen.rsandMOD_HIDDEN_VTABLESin itslayout.rs; forthe log,
hud_screen_updatedandhud_frameingame/crates/game-core/src/pause.rs.Testing
Tested: Windows 11, RTX 5080, NVIDIA 621.47. This change's runtime over the shared base, from the repository save
kokiri-start, in a window, withHOS_SYSTEM_MODS_DIRset to this checkout'sgame/mods, and two test mods: each holdsor gives back a
hideGameHud()on its own key, one also gives the Fairy Ocarina and six songs. Played by hand:scene clear. The text went on advancing with the box hidden, and the box came back on the release.
The first run showed the box still there: it was
MessageDialogScreen, not one of the first five screens. A runthat logged every screen while the HUD was hidden found it and the name's screen; both added.
notes and a whole song played; the bar came back on the release.
952d0bede: the box hidden, back on the release.system/widescreenoff, the game's mod listsaying it is off): a sign's box hidden and back on the release.
name and the "Hide / Conversation Log" prompts hidden; the log opened shows as usual with its blurred backdrop;
closed, everything hidden again, with no flash of the prompts; after the conversation the hearts stayed hidden;
everything back on the release. Before them (on
952d0bedeand on main): the log showed nothing on a black backdrop.On the way: a log told open by its controller focus (never set), and by its shown flag (+0x1b0) only, both gave the
black backdrop; the flags and the state (+0x384) were read in a run that logged the log screen's changing words.
dev.py smokeon the final build: PASS (in play fromkokiri-start, 900 frames, the menu opened).Checks:
the_hud_a_mod_hides_takes_the_text_boxes_and_the_ocarina_with_it(widescreen, new) fails on main for the bug (thetext box's drawing keeps its size while a mod hides the HUD) and passes here. It checks each of the seven screens
hidden during its update and put back after, drawn again after the release, the conversation log and the system
window left alone, with the widescreen mod off and on. With the fix's key line removed it fails again.
a_conversation_during_a_hide_keeps_the_log_s_backdrop_and_its_guide_hidden(widescreen, new) fails on952d0bede(the layer never let go, the log's button guide drawn) and passes here. It runs a conversation during a hide (the
log's screen closed, open, closing, closed, then gone), with the widescreen mod off and on, and checks the layer let
go through it and hidden after, the guide undrawn while closed or closing, the open log drawn, the hearts and the
lock-on undrawn meanwhile, the lock-on left to the layer outside a conversation, and the layer shown after the
release. With the fix's key line removed it fails again. The older test no longer lists the log's screen as left
alone: its own test covers it.
cargo testof sysmod-widescreen and game-core: pass (game-core'sfixes::barrierfailed once in a full run andpassed alone three times; this change does not touch it).
cargo fmt --all --check: pass.cargo clippy: nothing inthis change's files (main's three:
note_linesin build-core, build-assets'textures.rs:158, host-sys'settings_abi.rs:323).mise run test(Windows, 12 at once), on952d0bede: 848 passed, 11 failed, 52 skipped. On the heada91eed113: 847 passed, 12failed, 52 skipped: the same 11, and
test_renderer_new_handler, which took 240 s under the suite's load and passedalone in 1 s (this change does not touch the renderer). All 11 fail on main too and none reads
this change:
test_present_geometry_trace,test_present_image_free,test_present_held_image,test_present_acquire_ahead(the fixture does not compile),test_dlssg,test_no_map_reload,test_sync_watch_event,test_turf_budget,test_ui_renderer,test_no_game_title, andtest_lifter(clippy'slarge_const_arraysinhost-sys'
settings_abi.rs, and api'sa_walked_reshade_folder_counts_a_change_once_two_walks_agree).Still to test:
hideGameHud()while Navi talks, expecting her text hidden as a sign's and Saria's, and back afterthe release (not reached here: she could not be called in Kokiri Forest at the start).
hideGameHud()while the ocarina listens, expecting its"Waiting for audio" text hidden with the rest of the ocarina screen.
mini-game's), expecting no HUD piece on screen while the log is closed, and the log as usual when opened.
@Beanstalk talk to Saria from kokiri-start with a mod that holds hideGameHud(); expecting no text boxMeasurements
Verdict: the text box and the ocarina screen are hidden now; no speed is measured, as the cost is one vtable read
and a compare per screen update, only while a mod holds
hideGameHud().Setup: Windows 11, RTX 5080, NVIDIA 621.47; Kokiri Forest from
kokiri-start, played by hand, pictures by eye.The runs were on main
3a0f7d8f7. They still hold on main7bc53f841: its one new commit (#3209, the pause menu's modbuttons) touches none of these files, and the tests above pass again after the rebase.
3a0f7d8f7a91eed113Risks
Only these screens' drawing changes, and only while a mod holds
hideGameHud(). Their values are put back after eachupdate, so a mod that stops, crashes or is turned off leaves nothing behind. A mod that hides the HUD for long now hides
the player's text too: the docs say so. During a conversation under a hide the 2D layer is shown again for the log's
backdrop: a HUD piece drawn on it that none of the lists names would show until the conversation ends (none did at
Saria's). Players without such a mod see no change. Revert to undo.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.mainand here, for a change that shows on screen (Saria's greeting, hiddenHUD: the text box shown before MessageDialogScreen was listed, as on main, and hidden after; not attached, the
game's pictures stay on the PC).
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Windows 11, RTX 5080, NVIDIA 621.47, Kokiri Forest from kokiri-start, played by hand with two test mods holding hideGameHud(): Saria's text box and speaker's name hidden while the text kept advancing and back on release; the ocarina's button bar, staff and songbook hidden while notes and a whole song played, bar back on release; two hides counted; dev.py smoke PASS on the final build.
The game runs were on main
3a0f7d8f7. Rebased onto main7bc53f841just before opening: its one new commit (#3209, the pause menu's mod buttons) touches none of this change's files, and the widescreen and game-core tests pass again after the rebase, so the results above still hold.@review
Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The reported Windows run shows the Saria dialogue and ocarina screens hidden and restored, but several affected dialogue and ocarina paths remain untested. CI is also still running. Recommend approval; not approved on the forge.
Extends a mod’s hideGameHud() handle to hide text boxes, speaker names, message screens and the ocarina screen while keeping their input active. It reuses the existing projection-collapse mechanism and documents the behavior.
Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
game/mods/widescreen/src/layout.rs:233: The remaining listed screen variants need an in-game check before merge. (more on the line) Do: Run the listed sign, Navi, choice and microphone cases with a hide held and released; also check dialogue with the widescreen mod off and on Linux, and record the results.Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the tested cases: the author reports that Saria’s box and name and the ocarina’s bar, staff and songbook changed from visible on main to hidden on the PR, with text and song input still working. This is not a performance change; no speed measurements were reported.
Other systems: The screen-update wrapper runs with the widescreen mod on or off. The new test covers both states and checks that the pause map, conversation log and system window are not newly collapsed. The reported game run was on Windows with NVIDIA; Linux and the remaining message and microphone paths have not been run.
Switches: None added, changed or removed.
Reviewed:
952d0bede1against7bc53f8413: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the applicable standards, the diff and commit messages, screen.rs and layout.rs in full, and the affected projection, pause-state and wrapper code. Skimmed the remaining portions of wide.rs, pause.rs, runtime.js and the camera documentation. The requested review checklist and adjacent Tooling AGENTS.md were absent.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no commands from the project, builds or tests were run. The author reports Windows game runs and passing targeted tests; the supplied CI checks are still running.
Overlaps and merge order: None identified from the supplied pull request context; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -228,0 +230,4 @@/// message screens (UIMessageInGameScreen, UIMessageDemoScreen, UIBalloonMessageScreen, UITalkScreen) and/// UIOcarinaScreen. The 2D layer that call hides does not draw them. The conversation log (UIMessageLogScreen01, opened/// by the player as the pause menu) and UISystemWindowScreen are left alone.pub const MOD_HIDDEN_VTABLES: [u64; 7] =L1 (should fix): The remaining listed screen variants need an in-game check before merge.
When: Signs, Navi dialogue, conversation choices and the ocarina microphone prompt can use the newly listed screens, but the reported game run covers Saria and normal ocarina play. The fake-screen test cannot show whether those game screens actually disappear and retain their input.
Do: Run the listed sign, Navi, choice and microphone cases with a hide held and released; also check dialogue with the widescreen mod off and on Linux, and record the results.
L1: agreed, those runs are what is left, and they are the description's Still to test, one line each: a sign, Navi and a choice by hand on any PC, the ocarina with the game's microphone option on, the widescreen mod switched off, and Linux through the Test Farm. Not run yet; their results go into Tested as they come in. Saria's greeting and normal ocarina play are the only cases run in the game so far.
Ran BeanBot's L1 cases on this head (
952d0bede), Windows 11, RTX 5080, by hand: a sign's box hidden and back on the release; a yes/no choice hidden and still picked with the stick and A; with the widescreen system mod switched off, a sign's box hidden and back. Moved to Tested. Still to test now: Navi (she could not be called in Kokiri Forest at the start), the ocarina with the microphone option on, and Linux.@Beanstalk Linux, any GPU: from the repository save kokiri-start, walk out of Link's house to Saria with a mod that holds hideGameHud() while she talks; expecting her text box and name hidden while the text still advances with A, and both back once the mod releases the hide.
Beanstalk test farm
Commit
a91eed1· approved by nobody yet · dashboardA member of
BigBeanscan review this commit and comment@Beanstalkto test it.@review
Recommendation: Approve. The code is ready: only testing is left. The reported runs show the fix working for conversations, signs, choices and normal ocarina play, but the remaining screen variants still need their in-game checks. Recommend approval; not approved on the forge.
A mod holding hideGameHud() also hides dialogue and ocarina screens while leaving their input active. It uses the existing projection-collapse approach and restores the screen values after each update.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
game/mods/widescreen/src/layout.rs:233: The remaining screen variants need an in-game check before merge. When: Navi dialogue and the ocarina's microphone waiting prompt have not been checked while a mod hides the HUD. Do: Run both cases with hideGameHud() held and released, checking that their text hides and returns; collect the requested Linux result.Since the last review (on
952d0bede1)Still open: L1 (The remaining screen variants need an in-game check before merge.)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. The author reports that Saria's text and name, a sign, a choice and the ocarina interface disappear while hidden and return on release; text and ocarina input continue to work. No performance gain is claimed.
Other systems: Windows was tested with the widescreen mod both on and off, and two concurrent hides were checked. Linux, Navi dialogue and the ocarina microphone prompt remain untested; the Linux Test Farm run has been requested.
Switches: None added, changed or removed.
Reviewed:
952d0bede1against7bc53f8413: Read the diff, commit list, repository rules, screen.rs and layout.rs; skimmed the related projection and caller references. Other changed files were reviewed through the diff rather than read in full; the PR template and remaining related code were not read in full.; nothing run (a code review).Checked and fine:
Testing: No commands or tests from the project were run. CI is still running; the author reports passing focused tests and in-game checks on Windows.
Overlaps and merge order: None found in the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
Added two commits for the conversation log, which on main shows nothing and a black backdrop when opened during a hideGameHud(): its backdrop is a picture taken as its button is pressed, on the hidden 2D layer, so the layer is now let go for the whole conversation and what the HUD draws on it is hidden screen by screen (the gameplay HUD, the HUD's other screens, and the log's own button guide while it is closed). Tested in the game on Windows 11, RTX 5080: the log as usual with its blurred backdrop, no flash of the prompts as it closes, the hearts hidden after the conversation. New test fails on
952d0bedeand passes here; smoke PASS; the suite's failures are main's plus one timeout that passes alone. Other kinds of conversation are in Still to test.@review
Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The reported Windows runs show the text box, ocarina and conversation log behaving as intended. Navi dialogue, the microphone prompt and the requested Linux run remain unverified. Recommend approval; not approved on the forge.
The change hides dialogue and ocarina drawing while a mod holds the HUD hidden, while preserving input and allowing the conversation log and its backdrop to appear. It adds screen-specific handling and state tracking to preserve that behavior.
Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
game/mods/widescreen/src/layout.rs:233: The remaining screen variants need an in-game check before merge. When: Navi dialogue and the ocarina's microphone waiting prompt have not been checked while a mod hides the HUD. Do: Run both cases with hideGameHud() held and released, checking that their text hides and returns; collect the requested Linux result.Since the last review (on
952d0bede1)Still open: L1 (The remaining screen variants need an in-game check before merge.)
Checks: Still running: 11 checks.
Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes for the tested cases: the author reports Saria's text and normal ocarina play hidden on Windows, with input still working, and the conversation log showing with its backdrop. The remaining variants have not been run.
Other systems: The screen wrapper runs with the widescreen system mod on or off; both were reported tested on Windows. Linux, Navi dialogue and the ocarina microphone prompt remain untested; other conversation types are also listed for testing.
Switches: None.
Reviewed:
a91eed113aagainst7bc53f8413: Read the full diff, AGENTS.md, CONTRIBUTING.md, and the changed portions and surrounding HUD logic in game-core pause.rs and widescreen screen.rs. Skimmed the remaining changed files and recorded runs; did not read every changed code file in full or the pull request template.; nothing run (a code review).Checked and fine:
Testing: No commands that execute project code or tests were run during review. The author reports Windows game runs, game-free tests and smoke passing; CI remains in progress.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.