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.
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.
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…