Buttons hovering and clicking working randomly in smaller resolutions.

Hi,

Not sure which section to post this, sorry if it’s the wrong one.

My UI is setup the following way (this seems to be the standard accepted way to create complexe UI):

  • i create a mother widget which contains only a canvas panel, and add it to the viewport with MotherWidget->AddToViewport(0)
  • then i add (using MotherCanvas->AddChildToCanvas(ChildWidget)) all the other child widgets, which contains my buttons and checkboxes and whatnot.

The problem is that this setup works fine in full screen mode, but not in smaller resolutions windows mode.
In smaller res checkboxes work fine but buttons work randomly.

More precisely, in this screenshot:

ButtonHoverPb.jpg

1/ when hovering the checkbox with the mouse (as shown in the capture), the “5d10” button is highlighted
2/ when clicking on the checkbox, the checkbox is checked (correct behavior)
3/ when hovering the “5d10” button with the mouse, the “4d8” button (top left corner) is highlighted
4/ when clicking ONLY ONCE on the “5d10” button, nothing happens (no button is triggered)
5/ when clicking many many time randomly and quickly on the “5d10” button, it sometimes works (and the correct “5d10” bound function is called as expected).
6/ depending on the resolution and their location in the UI, some buttons work fine, and some other don’t (this looks very random)

1->4/ look like a mouse location vs. resolution problem (only affecting buttons)
5 and 6/ look like a Z-order problem

Again, everything works well in full screen mode with the native screen res (which also seems to point to a mouse location problem in smaller res).

I couldn’t even find where to setup the Z-order for individual buttons.
I tried to use AddToViewport(100) for the mother widget with no success.

I don’t know if those 2 problems (hovering-location and multiple-clicks-needed) are even related, nor how i can identify (not to mention fix) them.

Any idea or direction would be very welcome.

Thanks
Cedric

I think the problem is solved.

In case anyone bumps into it, i was using a UWidgetComponent.
I replaced it with a UUserWidget and everything started working correctly.

So i guess User Widgets handle screen resolution better than Widget Components.

Cheers
Cedric