-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cursor support #252
Add cursor support #252
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some random comments from looking through the code (not form proper testing yet)
Main concern for the review is the initial loading screen:
|
f702d13
to
502df1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 🎉
Could you address the comments I've made + rebase onto the current master branch? I'll continue reviewing tomorrow after work.
Also I noticed that in the province search panel, the cursor goes to the normal I
shape when hovering over the text edit box, while in Vic2 it stays as the pointing gauntlet.
e4fc499
to
b3110e2
Compare
3de13ca
to
6cacebb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a bunch of comments, the most significant being about handling pixels without creating loads of intermediate PackedByteArray
s.
Lemme know what you come up with, tbh we're nearing the point where I should just approve this (maybe after Spartan taking a quick look too) and leave further optimisations for the future, as this is working fine but just has so much code that it's easy to keep finding things to tweak
da53da1
to
fd98127
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, I've left some simple GDScript comments, once they're addressed I'm happy to get this merged :)
d42d2c8
to
674aa8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another absolutely phenomenal PR, well done Nemrav 🎉 Approved, just with a couple final non-blocking comments:
- I don't see the spinning compass mouse on the loading screen, but that's probably because everything gets loaded in a single call to the SIM repo/dataloader, so we'll need to switch to a staged approach in a later PR to have access to custom cusors before the game finishes loading
- Brick mentioned some remaining Mac issues, up to you and him how to deal with those
This seems to be a quirk of godot. To get it to appear, you need to initial logo animation away to get the proper loading screen which has the cursor mode marker as "busy" (this is expected). Then, you need to move the mouse so godot registers that it needs to change the cursor to match what the control nodes specify (not what we want). We could get around this at a later date by manually changing the |
7f3771e
to
d619d92
Compare
Also set the normal, busy, and ibeam cursors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on Windows, and we can fix any Mac issues in a future PR. It can be hard to catch the busy icon when the game is loading, often I only see the normal one but I think that's mostly down to timing issues between the game window and the dataloader.
Draft, loads cursors, animated and not animated, handles switching between cursors.
Currently contains code just for testing/demoing: right click the mouse to cycle through loaded cursors. The watch is set as an i-beam cursor so that you can try hovering over a text field (ex. in the new-game menu) to observe how the Cursor Manager handles auto-switching between animated cursors.
Loading of the cursors and generating new resolutions handled by the c++ side CursorSingleton. Managing what frame to display, and when to switch cursors handled by gdscript side CursorManager. This architecture is because we want a c++ dataloader, but we also need to listen to the scene tree to know when its safe to call a hardware cursor change.
Possible improvements:
.lookup_files_in_dir_recursive
?compat_Cursor
inner class whenever we switch cursors, which re-fetches the cursor stored in CursorSingleton. We can store a list of all compat_cursors to avoid this.