WebPanel: stay shown over the game until closed #14
Loading…
Reference in a new issue
No description provided.
Delete branch "AwfulWaffle/RynthCore:webpanel-persist"
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?
The in-game web panel disappeared whenever the player clicked anything but the panel: another program, or the game itself. This keeps it up until it is explicitly closed.
What changes
WebPanelWindowPolicy.Visibleis now open, game alive, not iconic, game visible. The panel still goes away on X, Escape, Alt+F4,CloseWebPanel,/rc webpanel close, the game window going away, or the game being minimized.KeepAboveGame, replacingRaiseAboveGame). It goes over the game, and under any window the player brings over the game, so it never covers another program. When finding that slot, the game's owned windows (RynthCore bar, floating panels) count as part of the game, so the panel stays over them as before. The panel's own dialogs count as part of the panel, matched by root owner.SetWindowPos(HWND_TOP)puts no window over it, not even a new window from another process. The call returns TRUE and nothing moves.HWND_TOPMOSTfollowed byHWND_NOTOPMOST(bothSWP_NOACTIVATE) does put the panel over it, and the game keeps the foreground. This is used only when no other program's window is above the game, and never for a topmost game. It logs once, and backs off to about once a second if it keeps failing.Show()sets the z-slot before the first show, so opening from a plugin while the player is in another program does not put the panel over that program.Tested
dotnet build src/RynthCore.Engine -c Release: 0 errors.tools/WebPanelTests: PASS, 151 assertions; theVisibilitycase is updated for the new rule.tools/WebPanelHarness. Its payload csproj does not build on main as it stands, because it never linksWebPanelBrowserGate.cs. That is unrelated to this change.Known behaviour
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.