Here’s my probleme…
I’ve create a widget , W_LevelBadge, that io’ve placed inside another widget, W_LevelScreen, through the User Created category. When I load W_LevelScreen, it modifies the W_LevelBadge with the proper information (level number, number of stars and if it’s locked or not). But when I click on the W_LevelBadge which contains a button (see 1st screenshot), it doesn’t trigger the OnClicked event.
and here is the W_LevelScreen screenshot
On the OnClicked event, I’ve even removed the code and just attached a simple print string and that doesn’t work either.
I do have have other widget with a “child” widget in them. The “child” widget does contain a button and that works fine, no problem. So why does this case not work? What am i doing wrong?
Turn on the widget reflector, shortcut (Ctrl+Shift+W), and make sure you can actually pick on the button. Looks to me like you’ve create a button with a whole bunch of images above it. You probably need to turn all their visibilities to Hit Test Invisible, as they are currently absorbing all clicks and forwarding them to their parent, which is not the button, it’s an overlay widget. Would have been better to have made the button the root, and the overlay inside the button.
Thanks for the replies. It’s cool to see the moderators and the staff answering the question we might have. Very much appreciated.
NickDaniell, I’ve tested your solution and it seems to be working. (The only reason I am not sure is because I need to implement it with all of the proper code!) But for now, it does detect that it’s a button compared to the others. The only thing, I had to put the visibility to Self Hit Test Invisible and NOT Hit Test Invisible. Because on Hit Test Invisible, it propagates it to all of the child widget.
Again, thank you and problem almost solve, gotta leave but will update as soon as I am finished.
Yep It’s working great… thanks guys