Change color on focus

I have buttons objects inside my option widget and I want them to change color when the controller is focused on them. But the color changes the entire widgets color. How do I target the button?

There are a couple of routes you can go to solve this.

There are a variety of ways to focus something, you can either tab to the control / widget, you can hover them with a mouse. You can also select them with a mouse. Depending on the actual “focus type” you may want to use different methods.

For instance buttons have events to verify if they are hovered or un-hovered:
bild

You can also overwrite the existing on focus functions as shown here:

1 Like

But how do I change only the button’s color? It only gives the action to color the entire widget.

Oh I see!

You can use the Set Style node and split the structure pin.

Split it until you have found the right control that you wish to change, and then modify it:

You can break out smaller pieces that you want to change as well.

1 Like