Four frames Sheet for button
-
Hello everybody. I'm trying to achieve a button which will display a 4-frames sprite sheet. 2 frames for its different states (on/off) and 2 others to show the action between those 2 states when the mouse is down (left clic pressed, before being released and activate the next state). Is there someone who have any idea how to achieve it ? I've already seen a lot of ressources about it but nothing enough concret to display it in my UI. Thanks by advance.
-
I think this is the default behaviour if you load an image with 6 equally spaced frames into a button. If you use six frames you'll also get mouse down states.
-
Thank you David, that's it !
-
@d-healey Is there any documentation for the six frame method?
-
Make a 6 frame vertical sprite sheet. You're art should mirror these states.
Now just create a button in HISE and choose your filmstrip in the property editor, enter your amount of frames (6) also in the property editor. That should be it.
This is an example of a button I did. I have spaces in between my images compensating for the shadows and highlights but they are evenly spaced. You can design your states to suit your wants/needs.
Hope that helps!
-
@Chazrox Perfect! Thanks