UMG Widget doesnt let to change cursor when hovering a button

I posted this issue already in the forums and other users tested it as a bug too.

I create a button inside a widget blueprint, select in behavior one of the icons I want my cursor to be hovered over and it doesnt work.

Example :

1 -

Hand cursor selected in the right.

2 - Blueprint for making the widget appear as soon as I start the level

3 - When playing it only shows the default cursor. Button hovers right (changing color) but not cursor.

Any solutions? Is this a known bug?

Hello Aian,

I was able to reproduce this issue on our end. I have written up a report ( UE-18873) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. I have also included a workaround below that may be viable depending on your needs. I hope that this helps. Thank you for your time and information.

Workaround:

In the example below I have set the cursor on mouse enter and mouse leave with a simple branch to see if the widget is being hovered over. This could be made into a function later for ease of use.

Make it a great day

Thanks for your answer. I tried your solution and I’m having a issue. I dont know if its related to this bug but it has so much in common.

1 - I have my Main Menu Widget and in here every button hovers into Hand cursor correctly.
2 - But when I enter my Controls Widget from Main Menu, I have to left click onscreen for having my “Is hovered” function enabled again. I’ve already set a Set Input Mode UI only (And Game and UI just in case).

So basically the mouse cursor loses the focus into the widget. It stills highlights text but doesn’t change the cursor when hovering until you left click once.

This is what I use to get to Controls Widget from Main Menu Widget. It is a simple OnClicked event.

And this is the Is Hovered function based off your previous answer (It totally works but, I repeat, only when I first click over the menu)
I added a Set color and opacity node just for testing and it works fine without having to click with the mouse. It automatically focus.

Sorry for all the text, I hope I’ve explained it clearly and thanks in advance

Hello Aian,

I took another shot at this. I found that you were correct and that the workaround does not work under the conditions that you specified. However, I have another workaround that deals with a custom cursor and it does not have the same set backs. You will have to make your own images for the custom cursors though. I hope that this information helps.

Workaround:

  1. Create a new widget blueprint
  2. Add an image to the blueprint (This image will need to be what you would like as your cursor)
  3. Set the screen size to that of the image (mine is a little green face)

50825-customcursorhoverhelp1.jpg

  1. Set this widget as the default cursor for the project (Edit > Project settings> User Interface > Default Cursor)

  1. Open the widget with the widgets that you would like the mouse to change over
  2. Use a get all widgets of class to call the custom cursor blueprint that is now the default mouse
  3. Change the image that is being used for the custom cursor blueprint

Make it a great day

Two little question, I’ve managed to get everything done except the node between Target Image 321 and Set Brush, the target with all the Pins. How can I make this one?

And, in the First Set Brush node you are using Cross image, is this the default cursor? Do I have to create another widget for it?

Thanks in advance!

Hello Aian,

The node is a get brush node that I have used the split pin feature on. You can do this by right clicking the pin and choosing “split pin”. This is also how I managed to get access to all of the other pins of the set brush node.

As for the image “cross”, this is simply just another texture that I am switching out to when I hover my mouse over a widget. In my example the green face texture in used as the default mouse. I then change the texture that is applied to the image widget (to cross when hovering) in the custom cursor blueprint.

This is labeled as fixed, but I’m in 4.15.1 and it’s not working again…

My apologies- I realize it does work. I had changed the cursor on a scrollbox widget, assuming the cursor would change when I hovered over the scrollbar itself. This is not the case. Ignore me, I’m crazy!