Set default mouse cursor in code, not project.godot #1839
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set default mouse cursor in code, not project.godot
When I first set the default cursor in commit
8e736db ("Add custom mouse pointer"), I
wrote:
Since commit 4dc1272 ("Mouse manager:
Set custom cursor for cross shape") that last sentence is no longer
true. It is more consistent to specify all the custom cursors in one
place, in the code.
In addition, setting the cursor in code rather than in project.godot
works around a Godot bug where specifying the cursor in project.godot
causes an error when the project is first imported into the editor,
because the image is accessed before the project has been scanned so the
UID is unknown:
The downside of doing it this way is that the OS default cursor will be
seen until the mouse_managers autoload is initialized. I don't think
this is a significant issue.
Resolves #1838