Hi and thanks for using my library. Glad it's being useful.
It would be very helpful to check out your examples in more detail to understand what you are trying to do, but I'd anticipate most cases are totally doable.
The scope for setCallback is object where the panel and widget is defined. For example, the following code, in the Create event of the obj_Player object, will rotate said object's sprite when held:
If the panel is created in another object, and there's only one instance, you can refer to the calling object and/or instance directly:
If you want to do something slightly more complex, you can bind the function to a specific instance via a method. For example, if there are three obj_Player instances, you can dynamically create three buttons in a panel, each of which rotates a specific obj_Player instance:
For the last example, I have attached a very small project here.
Please, share your code and or detail your use cases and I will happily guide you.