NoBackgroundHover
Stops R.E.P.O. menu hover highlights while the game window is not focused.
模組介紹 作者原文
NoBackgroundHover
Document version: 1.0.0
Last changed: 2026-05-04
Project type: Applications
Author: Zenoyui
Game: R.E.P.O.
Loader: BepInEx 5
Scope
NoBackgroundHover blocks local menu hover input when the R.E.P.O. window is not the foreground Windows process.
The mod changes only local UI input state. It does not change saves, network traffic, matchmaking, player data, game rules, or game files.
System Boundaries
In scope:
- NoBackgroundHover.dll
- BepInEx plugin entry point ru.zenoyui.NoBackgroundHover
- Harmony prefixes for menu hover and Unity UI event processing
- Local hover state cleanup on focus loss
Out of scope:
- R.E.P.O. game binaries
- BepInEx runtime
- Harmony runtime
- Other mods
- Operating system input routing
Trust boundary:
- Game assemblies, BepInEx, Harmony, Unity, and Windows focus APIs are external deps
- The Windows foreground window owner PID is treated as the focus source on Windows player builds
Runtime Characteristics
Execution model:
- Unity main thread
- Prefix patch on SemiFunc.UIMouseHover
- Prefix patch on SemiFunc.MenuSelectionBoxTargetSet
- Prefix patch on MenuManager.MenuEffectHover
- Prefix patch on Unity EventSystem input module processing when present
- Poll tick from one persistent Unity object
State:
- Cached reflection handles for menu types and fields
- Per-frame cached focus result
- No config file
- No persistent save data
Memory:
- Allocates one persistent loop object
- Reflection caches are static for the process lifetime
- Hover cleanup scans active scene objects only after focus loss or while unfocused
Shutdown:
- BepInEx unload is not used by the game runtime
- Unity process exit releases plugin state
Implementation
- Reads Application.isFocused
- On Windows, compares the foreground window process ID with the R.E.P.O. process ID
- Returns false from SemiFunc.UIMouseHover while the game is unfocused
- Skips Unity UI event processing while the game is unfocused
- Clears menu hover timers, menu IDs, click timers, selected EventSystem object, and selection box timers after focus loss
Risk And Failure Model
Operational risks:
- Game update can rename SemiFunc.UIMouseHover
- Game update can rename menu private fields
- Other UI mods can patch the same methods
- Overlay software can alter foreground window reporting
Failure scenarios:
- Missing SemiFunc.UIMouseHover patch leaves game-specific hover logic unchanged
- Missing private fields leaves part of the visual hover state until the game clears it
- Harmony patch conflict can change patch order
- Windows API failure falls back to Application.isFocused
Out-of-scope scenarios:
- Blocking keyboard or gameplay input while the game is unfocused
- Changing how Windows chooses the foreground process
- Fixing hover behavior inside other mods
- Changing R.E.P.O. menu layout
Residual risks:
- A game update can move hover logic to a new method
- A third-party overlay can keep the game focused at the OS level
- UI mods can draw their own hover visuals outside R.E.P.O. menu classes
Limitations
- Requires BepInEx 5
- Targets R.E.P.O. Mono build
- Focus gate is local-only
- No config UI
- No network sync
Performance
Runtime cost:
- Focus read: once per Unity frame
- Cleanup retry while unfocused: 0.25 sec interval
- Scene object scan runs only during cleanup
Measured cost is not included in this release.
Install
app:
- Install the package
- Start R.E.P.O. from the selected profile
Manual:
- Install BepInEx 5
- Copy BepInEx/plugins/NoBackgroundHover/NoBackgroundHover.dll into the game BepInEx plugins folder
Auth
Author: Zenoyui
Plugin GUID: ru.zenoyui.NoBackgroundHover
Assembly name: NoBackgroundHover
Use the SHA256 value below to compare DLL files.
Hash
NoBackgroundHover.dll
SHA256:
53378267794F775162CBEB9FA66F294C09D15F816C616029E33DF5F1D257F85B
Files
BepInEx/plugins/NoBackgroundHover/NoBackgroundHover.dll
Logs
BepInEx log lines:
mod: init (id=ru.zenoyui.NoBackgroundHover, ver=1.0.0)
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: