Custom Button States

I wanted to make a ImageButton to appear differently depending on a variable. The ImageButton would behave more like a checkbox. I know that there are other options such as subclassing the CheckBox or ToggleButton. This was more of a curiosity. My use case was I had a loop button that I wanted to display a different image when it …