No announcement yet.

Switching and selcting Buttons with mousewheel

  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    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.

    Click image for larger version

Name:	ue4.png
Views:	136
Size:	121.7 KB
ID:	1522270

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

    Leave a comment:

  • replied

    Please anyone?

    Leave a comment:

  • started a topic Switching and selcting Buttons with mousewheel

    Switching and selcting Buttons with mousewheel


    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?