Repository navigation
modoptions: 修复键盘/手柄配置界面被设置页盖住 + 返回时的泛白 - #6
Merged
Dilant merged 5 commits intoOct 23, 2026
Merged
Conversation
The Everest keyboard/button config UI is an entity added at depth 0 while the material mod options page is drawn on top of it, and the acrylic pass renders the whole scene into a blurred snapshot before drawing the page again. Suppress acrylic while the config screen is open, freeze the page's input, and lift the config screen to a foreground depth instead. That also fixes the white flash on Esc: the old fix pushed the page to depth 1, which put it behind depth-0 Overworld entities (mountain, snow), so the bright world leaked through while the config screen faded out.
Contributor
Author
|
看了一遍最新实现,结论:层级修对了,泛白也按正确方向修掉了。
我这边拉最新 head 跑了 两个小观察,没改:
本机 Linux 跑不了游戏,实机验证还得麻烦你在 Windows / Android 上过一遍 PR 里的三步。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
从模组设置页进入「键盘配置 / 游戏手柄配置」后,Everest 的按键配置界面被设置页盖住,看不清也点不到;设置完键位按 Esc 返回时还会泛白一下。
原因
ModuleSettingsKeyboardConfigUI/ModuleSettingsButtonConfigUI是加到同一个 scene、Depth 0 的实体;MaterialModOptions是盖在它上面的设置页。MaterialAcrylicRenderer会把整个 scene(包括配置界面、HUD、雪)先渲染进快照做模糊背景,再把设置页画一遍在最上层,所以配置界面被“吸”进背景。Depth改成 1 让它排到配置界面后面。但 Overworld 的其它 Depth 0 实体(山、雪等)也在同一层,配置界面淡出时亮色世界会从设置页后面漏出来,形成一瞬间的泛白。修法
KeyboardConfigUI/ButtonConfigUI时把配置界面抬到设置页上一层(Depth - 1),按键界面自然盖在设置页上。IMaterialAcrylicOverlay:acrylic 抓快照前把“在设置页之上”的 HUD 实体(配置界面、InputEntity等)临时隐藏,快照/模糊完成后在设置页上方重新绘制;HiresSnow同样从快照拿掉并在页面上方渲染(vanilla 里雪本来就在最前)。改动文件
Source/MaterialModOptions.csSource/MaterialAcrylicRenderer.csSource/IMaterialAcrylicPage.csIMaterialAcrylicOverlay接口Source/MaterialTouch.csSuppress辅助Source/QolSettingsOverlay.cs本 PR 只含键位配置修复;string 设置项 / 游戏内文本框在 #5。两个 PR 都动了
MaterialModOptions.Update/UpdateInteractions,先合哪个都行,另一个我会 rebase。验证
dotnet build Source/MicroblocksQolUtils.csproj:0 error / 0 warning(Everest stable lib-stripped)dotnet run --project Tests/Capture/Capture.csproj:PASSReview 备注
externalOverlays会收集所有Tags.HUD且 Depth 在设置页之上的实体(目前主要是配置界面和InputEntity)。这符合普通渲染的层级,但以前 acrylic 页面会把这些一起盖掉;如果其它 mod 的 HUD 也挂在这个区间,现在会重新显示在设置页上方,属于有意的行为变化。HiresSnow现在对所有 acrylic 页面(包括章节选择)都画在页面上方,和 vanilla “雪在 UI 最前”一致;确认这是想要的效果即可。