Download

Switching and selcting Buttons with mousewheel

Hi.

I have a widget with a scrollbox and try to switch between buttons.

The scrollbox should not scroll when I move the mousewheel, but switch between the buttons.

The ui mode is set to “game”, the player can move freely but should be able to choose between the buttons with the mousewheel and confirm the selectioon with the middle mouse button.

how can I achieve this?

thanks

bump

Please anyone?

This is quite simple problem if you have all the buttons stored in an array. Basically you don’t even have to have the scrollbox but any kind of panel widget. You get all widgets under parent (in your case the scrollBox) and iterate through them as you scroll and when you hit middle mouse button you can get appropriate response with switch or something else you will see fit. And as for input you can either override a few functions that catches input or set the input in your pawn and cast it into widget.

Here I’m including just in case simple function to get all children. Probably there is a better way to do this but at least this might give you some ideas.

ue4.png

I hope this will helps and feel free to ask for more details if necessary.