I’ve been working on some custom buttons for a UI I’m building. The buttons use custom SVG images for the background and another SVG image for the primary content inside the button. Its essentially an icon-button.
I found the various button pointer animation properties (
pointerOutAnimation) available which has enabled me to easily create a unique style for the button’s normal, hover, and focus states.
isEnabled does a nice job preventing interaction when the button is not enabled. Now I’m trying to figure out the best way to handle the button’s when they are in a disabled state.
For my case, I want to change the background image and foreground image when the button enters a disabled state. But generally speaking, each element in a button (background, images, text) may need changed for a disabled state. I don’t see this being any different than the pointer animations. Also, this same question comes into play again when I start building my Toggle Buttons.
Is there a recommended way to define and animate a unique state for a button, but specifically for when the button is disabled?