# How to control pressed and unhovered button action?

**URL:** <https://forums.unrealengine.com/t/how-to-control-pressed-and-unhovered-button-action/837262>\
**Category:** Blueprint\
**Tags:** unreal-engine, editor, Widget, question, Blueprint, UMG\
**Created:** [April 1, 2023, 1:53pm UTC](https://forums.unrealengine.com/t/how-to-control-pressed-and-unhovered-button-action/837262 "2023-04-01T13:53:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nechalon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nechalon/32/967402_2.png) [@Nechalon](https://forums.unrealengine.com/u/Nechalon)\
**Post date:** [April 1, 2023, 1:53pm UTC](https://forums.unrealengine.com/t/how-to-control-pressed-and-unhovered-button-action/837262/1 "2023-04-01T13:53:44Z")

</div>

Hello, I’m trying to setup a basic hovered, unhovered, pressed and unpressed event for buttons.

The button has 1 Text block inside of it, I have already set up the normal, hovered, pressed background images for the button, and also set up the text color for hovering. Now, the problem is that when I hover the button, it looks good, and also when I press it, but if I keep holding it and unhovering, it removes the hover event from the text, which makes it look bad.

Normal  
 ![kép](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/a/78a5395b84229b59685434adc0439566bc9a20c6.png)  
Hovered  
 ![kép](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/c/d6cabfc086a812da9f09dc5bf66d2182ef406732.png)  
Pressed and unhovered  
 ![kép](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/5/9155a9af675c41ddf732b865288375d21092f4ab.png)

What can I do to keep the hovered effect of the text block when the button is pressed and held independently of the cursor’ position?  
(I also tried all the button events (On Clicked, On Pressed, On Released, On Hovered, On Unhovered))

---

<div class="post-metadata">

**Author:** ![Nechalon](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nechalon/32/967402_2.png) [@Nechalon](https://forums.unrealengine.com/u/Nechalon)\
**Post date:** [April 1, 2023, 2:00pm UTC](https://forums.unrealengine.com/t/how-to-control-pressed-and-unhovered-button-action/837262/2 "2023-04-01T14:00:10Z")

</div>

Using a boolean and checking whether the button is pressed (in hover event) would be the best solution?
