Setting On Hovered Events For Comboboxes?
I'm setting up my main menu and part of that involves enabling sound effects for hovering over and clicking my buttons. I've hit a little snag when it comes to my comboboxes, however, as there isn't a "Create Event" option for "On Hovered" like there is for standard buttons. How can I achieve this?
asked Jun 07 '19 at 04:01 AM in Blueprint Scripting
tl;dr - User Widgets.
You'd need to create a separate widget that has the ComboBox (and any other associated elements). And then add those user widgets to your main panel. Since each of those ComboBoxes is a brand new widget, you can override its onMouseEnter / Leave.
This also gives you a chance to encapsulate functionality in the ComboBox itself, perhaps there are things that the main panel does not need to be cluttered with. It also makes it possible to maintain the widget throughout the game. Imagine what happens if you're suddenly unhappy with the shade of green of your 74 ComboBoxes distributed unevenly across 6 menus. Having a widget wrapped with a user widget makes all the changes done to it propagate.
answered Jun 07 '19 at 07:05 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here