# No hover events for GUI widgets during button press?

**URL:** <https://forums.unrealengine.com/t/no-hover-events-for-gui-widgets-during-button-press/434602>\
**Category:** UI\
**Tags:** hover, click-event, unreal-engine, gui, Widget, question\
**Created:** [September 27, 2018, 2:50pm UTC](https://forums.unrealengine.com/t/no-hover-events-for-gui-widgets-during-button-press/434602 "2018-09-27T14:50:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxPower42](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaxPower42](https://forums.unrealengine.com/u/MaxPower42)\
**Post date:** [September 27, 2018, 2:50pm UTC](https://forums.unrealengine.com/t/no-hover-events-for-gui-widgets-during-button-press/434602/1 "2018-09-27T14:50:02Z")

</div>

I need to get hover events for my widgets all the time, even when a mouse button is being held down. My PlayerController class’ InputMode is set for Game&GUI. I am working on a system that allows universal input operations, including dragging with a button held down, between any widgets and actors/components. For this, I also need to know when any of these objects start being “hovered” by the cursor.

It works for scene-objects all the time, but for widgets it only works when the button press (being held down) originally occured on some widget, and not in the scene. So, I can drag without problems from widget to widget, widget to scene-object, scene-object to scene object, but scene-object to widget disables all widget hover events.

---

<div class="post-metadata">

**Author:** ![MaxPower42](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaxPower42](https://forums.unrealengine.com/u/MaxPower42)\
**Post date:** [September 27, 2018, 7:12pm UTC](https://forums.unrealengine.com/t/no-hover-events-for-gui-widgets-during-button-press/434602/2 "2018-09-27T19:12:13Z")

</div>

This is actually a big deal… I also want to have a kind of context menu that pops up when you hold a button on something, picks an option when you release the button, and gets removed as soon as you move the mouse cursor out of it.

But I can’t do it, because the widget doesn’t respond to anything until the button is released… Isn’t there something I can do about this? I believe it has something to do with viewport focus, mouse capture settings etc, but I can’t seem to figure it out or find something on it.

---

<div class="post-metadata">

**Author:** ![MaxPower42](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaxPower42](https://forums.unrealengine.com/u/MaxPower42)\
**Post date:** [September 29, 2018, 5:10pm UTC](https://forums.unrealengine.com/t/no-hover-events-for-gui-widgets-during-button-press/434602/3 "2018-09-29T17:10:09Z")

</div>

This seems more like a workaround than a clean solution to me, but it helps to set a GameAndUI input mode on the player controller right after the press-event to cancel the GUI being completely ignored. If someone has a better fix…

---

<div class="post-metadata">

**Author:** ![AMahone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AMahone](https://forums.unrealengine.com/u/AMahone)\
**Post date:** [June 22, 2024, 8:18am UTC](https://forums.unrealengine.com/t/no-hover-events-for-gui-widgets-during-button-press/434602/4 "2024-06-22T08:18:54Z")

</div>

Because after you calling SetInputMode GameAndUI, method SetInputMode calls **ReleaseMouseCapture**

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/0/aa028426a885368ae3e5d429f6abc4bd97bc7de8.png)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/4/57411ae6b3b67dded32629e6200454ce1ee433fa.png)
