fungus
fungus copied to clipboard
On UI Button Hover New Command
Description
UI button mouse cursor state change. Some users asked this feature on discord to easily change cursor icon when hovered over a button.
What is the current behavior?
We don't have this command yet.
What is the new behavior?
- When mouse hovered a button, the cursor icon/texture will change based on the assigned texture2d.
- User can assign different Texture2d as their mouse cursor to different buttons (multiple cursor).
- Standard cursor mode, hotspot etc..
- Custom default cursor slot provided for when the game already uses custom mouse texture for fallback.
- Optional AddListener to execute block.
Example video:
https://user-images.githubusercontent.com/64100867/154214872-7c5dc16a-41dd-475e-aaa8-6309eb67ce00.mp4
Important Notes
- My change require modifcations or additions to documentation
- It compares GetInstanceID instead of object's name to avoid same name conflicts.
Other information
- The new command will be in UI/OnMouseCursorHoverButton
Edit: Edited description and typo
I kinda think the AddListener isn't necessary. Just share your thoughts on this...