Zenoyui-NoBackgroundHover icon

NoBackgroundHover

Stops R.E.P.O. menu hover highlights while the game window is not focused.

By Zenoyui
Last updated 4 hours ago
Total downloads 10
Total rating 1 
Categories Mods Client-side
Dependency string Zenoyui-NoBackgroundHover-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

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

Thunderstore 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)
patch: ok (target=SemiFunc.UIMouseHover)

Change Log

See CHANGELOG.md.