Buttons in embedded UMG widget don't send clicked/pressed events

Hello,

tl;dr
skip to the comment added below.

By embedded I mean :
In level blueprint I create UMG widget Main Menu.

If the Profile button in Main menu is clicked, I create UMG widget Profile.
(So Main Menu is behind the profile widget now)

Some buttons in Profile widget are giving me problems.

The UMG widget Profile has some buttons, text objects and borders with text children in it. Two of the buttons (yes and no), and a border with a child, are scaled to 0 by default (with no animation selected) as I only want them to be displayed when a specific button is clicked.

That specific button is “Create New”. When it’s clicked I play an animation which scales up the border (zorder 4) “yes” and “no” buttons (zorder4).

The “yes” and “no” buttons are set to visible and are enabled by default. Their visibility and enable properties are never changed anywhere. I’ve verified . I checked all animations to make sure it’s never changed.

The problem:
When I hover the mouse cursor over the “yes” and “no” buttons the buttons light up. But when I click on them nothing happens.

I tried setting their zorder to 10. They still light up when hovered over, but don’t trigger the onclicked/onpressed event, or depress when clicked on.

Is there a limit to how many times you can nest a UMG widgets?

Edit: Apparently the order they’re listed in the canvas is important. Say if I have a border and a button set to the same Zorder. If the button comes before the border in the list, the button will be behind the border. Moving the button after the border allows it to be shown.

What’s the reason for having canvas list order and zorder both affect an object’s sort order?

Thanks in advance!

Here’s all the data needed to see the problem.

① Start new Sidescroller project.

② Add “UMG” folder to SideScrollerBP folder.

③ Save and close project.

④ Extract MainMenu.uasset and ProfileUI.uasset from the attached UMGwidgets.zip, and stick’em in the new project’s

Content\SideScrollerBP\UMG folder

⑤ Relaunch project

⑥ Add a new map, load that new map and stick in the new map’s level blueprint

⑦ Wire the Begin Play to the Set Input Mode UIOnly node

⑧ PIE, click on “Profile”, then click on “New” (on the right).

⑨ Try to click on Yes or No.

Result: Nothing happens.

Expected: Something happens.

Thanks a bunch in advance if anyone could tell me what’s wrong with thing.

I’ve tried remaking it 3 times, and toggling is enable and visibility accordingly via animation, but can’t get them to work.

Update 1: Creating a simplified version of ProfileUI widget, one with only the 4 buttons used in sample, everything worked fine. Made me think the ProfileUI widget I supplied is corrupt.

Update 2: Instead of putting the buttons in ProfileUI widget, I created an entirely new one and tried to call it from ProfileUI. The buttons don’t work there either.

I have to give up on . I’ve banged my head on it for about 40 hours. I think it’s a bug because I frequently run into problems with the designer (i.e. right click and hold to drag/pull the canvas brings up the context menu instead, and about 3 others). Thanks!

Sorry to bump .

Could someone familiar with UMG try to follow those steps I provided to see if problem is user error or a bug?

It’d be much appreciated.

Hello ,

Thank you for the information above however, I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce issue on our end (the steps above appear use your current assets)?
  3. Could you provide screen shots of the blueprints/widgets that may be involved with issue?

Thanks to Rudy I found the error in my ways.

The reason why the buttons weren’t working in a specific widget blueprint was because I did Create Widget on both OnClicked and OnPressed, like the ss below:

Removing the OnPressed (Newchar_button) node allows the buttons in the Pro Delete widget to work real nice-like.

I was originally under the impression that OnPressed was meant for touch screens.

Fwiw, the issue I was having was different from [][2] one, as I wasn’t disabling the button that was being pressed.