Thanks for this, i was planning on doing something like this in a future project, so this will probably come in handy when the time comes
One thing i wonder though, shouldn't
Code: Select all
cursorlist = [["default_cursor.png", "default", (0, 0)],
["eye_cursor", (50, 50, 50, 50), (0, 0)]]
be like this?
Code: Select all
cursorlist = [["default_cursor.png", "default", (0, 0)], ["eye_cursor", (50, 50, 50, 50), (0, 0)]]
I wonder why to use this rather than
config.mouse though. Even if that can change the cursor, if i understand things right this code would still be useful if modified to place images beneath the cursor, and that's something i'll be needing as-well.
Thanks for the flashlight idea too, that's something cool to keep behind the ear, it might make for some cool gameplay if used right.
The difference between lists and tuples is that tuples are immutable (this means they cannot be changed or edited in any way, the only way to edit a tuple is to convert it to a list and then edit the list, tuples are just there for values that are supposed to be permanent and never supposed to be changed throughout the entire code)
one thing that would be cool though (and as a fellow programmer i highly recommend) would be if you'd use comments more in your code, as a general rule if i'm writing something that isn't completely self explanatory (for example dialogue, or "with" effects (like Pause or Dissolve)) i always add a comment to explain what the hell it was i was writing here and how it works in case i need to look at it again at a later date when i've forgotten how exactly it worked. The nice bonus is that it also makes your code more easily readable to others, especially beginners like me ^_^
As for the cursor disappearing in the menus, you could probably edit an entry somewhere in the code to execute a command (to get the cursor back) everytime a menu is opened, and through variables you could probably even restore the cursor state to what it was before opening the menus when the menus are closed.