Keep "pressed" appearance focused when button is pressed

I’ve added some buttons to my Widget Hierarchy and I have changed their appearance/design in their respective categories: Normal, Hovered, Pressed.

My question is. I want the appearance of the button to keep its “Pressed” appearance even after the button is pressed. This is because I want to visually show that the button is active.

Can anyone please help me. I really think there should be a “Focused” input aswell.

It shouldn’t be difficult. In the HUD or interface where you add. Uttons etc. There should be an option to choose the colour or the buttons with options when such as ‘pressed’, ‘not pressed’ (can’t exactly remember), just make sure to change the colour of the button to the same colour as when pressed.

Hi, Thanks but I am not using the standard UE-button design and colors. I have customs assets. Change the color won’t be the way to do it in that scenario

What does the ‘asset’ look like once it is pressed?

126021-knormal2.png

126023-kpressed.png

126022-khover.png

Please see attached photos. I want to keep the “kpressed”-image focused when pressed once. And to return to “Normal” as I click it again.

I’m presuming you’re using a sprite or some sort of variant for the button. If so can’t you just replaced the thrid image with the second?

That would work if I only had one image. I have several tabs on a row like the example above. If I replace the image they will all have the “Pressed”-image as Normal

Use Checkboxes instead of a Buttons for that purpose. Checkbox can remember its pressed state of course. So still this “Button”(Checkbox) is “pressed”(checked) - it keeps its state (color, image etc). When you press(uncheck) it again it returns to Normal state. To mask real Checkbox as Button just replace default Checkboxes states Styles with Buttons images you have. Also play with Padding and other align options to make CB looks like a button. Also you might need to use “Set Is Checked” or/and “Set Checked State” Nodes inside Widget Blueprint Graph to switch all your “Buttons” between each other (for example - when you “press” other “Button” you need the previous one that was “pressed” will become “unpressed” and etc).

1 Like

How would one go about this with a dynamically generated series of checkboxes/“Buttons”? ! seem to be failing at it currently. 1

Never tried that with dynamically generated widgets, sorry. I am just using that method with standard premade checkboxes-buttons in Menu…

I’m driving a car. I made a gas button. But once you hit the gas, it doesn’t go on. I want her to go as far as I can on the gas button. But I couldn’t solve the problem. Could you help

Use On clicked event, to change the color of the button, then use flipflop, to set it to normal if it’s pressed again.

I am simply utilizing that strategy with standard premade checkboxes-catches in Menu