HomeWildfire Games

Reset the cursor when opening new GUI pages. Patch by danger89, refs #539.

Description

Reset the cursor when opening new GUI pages. Patch by danger89, refs #539.
Remove duplicate cursor image and duplicate hardcoded default paths.

Details

Committed
elexisNov 14 2016, 2:23 PM
Parents
rP18932: Remove the URL entry of the desktop file, because that can only be used to…
Branches
Unknown
Tags
Unknown

Event Timeline

elexis added inline comments.Nov 12 2019, 1:50 PM
/ps/trunk/source/gui/GUIManager.cpp
102

Concern:
This calls ResetCursor after LoadPage and LoadPage calls the JS init function of the loading screen which calls Engine.SetCursor("cursor-wait");.
So this line broke the cursor during loading screen (by resetting after loading and running the JS script files and calling the JS init function) (or any page setting a cursor on int).

Instead, the cursor should be Reset just prior to the page construction.

Concern:
Also notice that the cursor is not reset when the page is hotloaded.
This is incorrect, since the by design the page is enabled to expect / rely on the default cursor being set when the page is opened (and hotloading is the same as opening the same page again).
Therefore the ResetCursor should actually be in LoadPage.