How to avoid this weird behaviour with buttons?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Hamster at Dawn

I have set up a button with a texture background. The texture changes when the button is pressed to show a pressed down button image.

If I hold the left mouse button down then the pressed image displays, however if I then move the cursor off the button while holding down, it displays both images simultaneously! This does not reset, even after releasing the mouse button the two images are still visible as in the screenshot below.

I don’t know if this is a bug or if I’ve misconfigured something, but it looks a bit unprofessional and I’d like to try and fix it.

default button

pressed button

messed up button

:bust_in_silhouette: Reply From: Hamster at Dawn

I seem to have resolved my own issue by deleting the “focused” style. I’m not sure why it shows two styles at once when focused but I’m able to ignore it.