Closed AGulev closed 6 years ago
I think we'd better to leave the choice to developer, not bind it to bundle_resources, but we can provide a helper method like yours. The windows example is made by me, and i do not know the bundle resource at that time.
The problem with this is that on macOS a file path would not suffice. The hotspot X and Y are also needed. I can make it so that you can also pass in a file path on macOS, if you want to. Cursors are implemented very differently on all these platforms and trying to unify them is hard.
no, I don't need it. no problem. I just wanted to do it simpler for users.
As I think would be better to have one simple method for every platform set_cursor(nil or CONSTANT or path) where user can set path to the image .
I think those constructions are difficult:
`
Developer can include cursor file "as is" into the bundle using hidden parameter: bundle_resources (I made it with icons). https://www.defold.com/manuals/project-settings/#_project
Thanks to @dapecthu I made: defos.get_bundle_root() - method that returns path to bundle, defos.PATH_SEP - path separator depends of platform. Those methods can help with this remaking.
I can make it after merging my current set_icon pull-request. What do you think about it?