OpenVicProject / OpenVic

Main Repo for the OpenVic Project
https://openvic.com
GNU General Public License v3.0
360 stars 27 forks source link

Cursors #252

Open Nemrav opened 1 month ago

Nemrav commented 1 month ago

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: