How to recognize UMG button hovered state, having a text or a image over it?

I want to make a level selection screen as shown in the image, for this I have placed 10 buttons wrapped with ‘uniform grid’. I am placing a text field over the buttons to display level number, further i even want to display stars of each level.

My problem is, if I place a image or a text field over the button, button won’t recognize weather it is hovered by mouse cursor and even a mouse press.

How to achieve this ?

44817-umg-button.png

Change visibility of thing you don’t want to effect by mouse over to Hit Test Invisible, like text or image or what ever is on top of the button.

If I change the visibility of overlapping text or a image (when hovered by cursor), this will lead to a bug. Button must include level number.

Hi,

I can get the image to collect mouse click.

this is really helpful, but how can we get to know if mouse has hovered the image or text?

Running out of luck with text.

You may just have to have 10 different pictures, instead of text over image.

Have you thought of putting your images on top of buttons?

Make button invisible?

All I did was make button see through, add image.

44950-capture.jpg

You should be able to call hovered option as well, not very good with hovered.

I have not watched, but will when I get back from shopping.

[Unreal Engine 4 Tutorial - Main Menu with Start / Load Level + Exit Game

Unreal Engine 4 Tutorial - Main Menu with Start / Load Level + Exit Game - YouTube

Elaborating issue : I have setup UMG button, having three different image one for button’s normal state, one for button’s Hovered state and one for button’s pressed state.

Using this button I want to create a level selection screen. This screen will include multiple buttons representing different levels.

44817-umg-button.png

Everthing is fine till now, whenever I points mouse cursor over the button, button changes its image(hovered image). In order to display different levels, I need to have level number over each button, so i added a text field on each button, now when I points mouse cursor over the button, button changes its image(hovered image), but when I take mouse cursor over this text field button image is set back to the button’s normal state image and even if I press mouse left button, button have no effect of the mouse press.

I really don’t want to create different images for each buttons, as I am planning for around 30+ levels.
Will give a try to have a invisible button.

Ok

I just made up an simple one with mine. Set the button to be an image, made hoveover red and it works fine.

Click works aswell.

I am going shopping.

But when I get back, I will find 3 different pictures, and try to replicate your issue.

Thanks for the help, have fun while shopping :slight_smile:

Thanks ,
I got this done by having button image as image, then added a text field over the image and then added transparent button over the both. Now I change button image as per transparent button state (isHovered or isPressed).

It is processing now, but is this kinda what you are after?

Video

That would work, but no need as shown above.