Unclickable Buttons?

So I’m working on the UI widget and all the buttons the are under a Canvas Panel are unclickable. They all work when I take them outside of the Canvas Panel.


‘Canvas Panel’ is the name for a folder in a Widget Blueprint editor, right? So it shouldn’t affect anything…

Canvas panel is not a folder, it is a widget which can hold widgets. A panel with the specific feature that any widgets contained by it can be positioned easily.
If the buttons being “under” means contained by it, it should not matter.
Else, a widget might be on top of your buttons and taking the click events. You can check the “Visibility” property, if a widget says “Visible” it can consume the mouse click.

Ok, so…

  1. How do I create a folder for widget elemnts? I wanna affect multiple elements at the same time.

  2. How do I set it so that all buttons under the mouse cursor get clicked, even if they are overlaping?

Ah that is unusual, normally you’d focus on one interactive widget at the time like a single button, that is also how the widget system is designed. You could create a UserWidget to hold several buttons using NamedSlots and register the click on the UserWidget, then from there call any activation logic on the buttons.

This sounds like a misunderstanding to me.

I think OP is describing a situation where one Widget with a Canvas is created and placed into the Viewport (such as a menu). Then another Widget with a Canvas is created and placed into the Viewport (such as a chat dialog?). When the Chat Dialog is active, the Option Menu is unclickable.

This would be because the z-order of the canvas is such that the Option Menu is behind the Chat Dialog and the click events cannot pass through. This makes the Option Menu unclickable.

This is my interpretation anyway. :slight_smile:

^ If I’m right (for future readers) I think the solution would be:
Instead of programmatically adding widget’s with their own canvases to the viewport – programmatically add overlays, or buttons, etc to a single canvas using some kind of manager/controller.

You can add anything you want in any way just ensure that the visibility property of the widget is set to “not hit testable” so you can’t navigate to it and can’t click on it. your click will go through it.

1 Like