Skip to content

v1.8.8 - the mouse goes where the player is looking

Choose a tag to compare

@maschine34675 maschine34675 released this 24 Aug 19:54
· 16 commits to main since this release

One long fault, found and fixed in stages. A mod's panel covering the middle
of the screen could stop the mouse from turning the player, with nothing
anywhere to say why - and every early guess about the cause was wrong.

The cause is geometry, not the cursor. The game locks the pointer to the centre
of its own window while the player looks around, and Windows delivers mouse
movement to whatever window sits under it, no matter who holds the foreground.
A panel over that point receives the movement. Nothing is in error, which is
exactly why nothing reported one. Holding a mouse button restored it, because
that gives the game window a capture - the detail that made it look like a
cursor problem for an evening.

OverlayOptions.ClickThroughWhenUnfocused is the fix: while the game is
the window in front and is actually holding the mouse, the mouse passes through
the overlay to the game. Off by default. While it is engaged the panel cannot
be clicked back to the front - a click is mouse input like any other - so a
consumer that switches it on needs a hotkey, which is how it was opened.

It engages only while the game really holds the mouse. In a menu the cursor is
free, the game has no use for the centre of the screen, and the panel behaves
like any other window. And when the answer is contested - a configuration menu
showing the pointer while the game hides it again in the same frame - the last
settled answer stands, rather than the window's style being rewritten a hundred
times a second.

Also fixed on the way: FreeCursorWhileShown never fired for a panel that was
shown and focused in one go, which is what opening one normally does; a refused
navigation no longer disturbs a working overlay; and answers and completions
are bound to the document that asked for them.

Rolls up 1.8.4 through 1.8.8, which were development steps rather than
releases. CHANGELOG.md has each one separately.

Extract over the game root. Consumers gating on a version want 1.8.7 or newer
for the click-through behaviour; 1.7.0 is enough for FreeCursorWhileShown.