Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Scroll Box: automatically scroll to keep my selection in view

Hey guys. I've got an inventory menu in UMG with a Scroll Box that I'm dynamically populating with buttons, each representing an item in my character's inventory. The issue I'm having right now is that, because I'm using a gamepad to control my game and not a mouse with a scroll wheel, when I move my selection down my list of items, my selection goes right off the screen. I can, of course, grab my mouse and scroll the box manually to see where my selection went, but that's obviously not going to be an option in the long run.

I found the "Set Scroll Offset" thing for the Scroll Box, and I've got it set up to where it sets an ever-increasing amount the more I press Down on my gamepad, and that sort of works, but it's not conscious of my selection, so the more items I have in my inventory, the more out of sync the scrolling becomes as I move around on the list.

I'm looking for a way to tell the Scroll Box which item I have selected so that it can make sure to scroll appropriately to keep it in view at all times. Any ideas on how to do that?

I can get the number of items being displayed, and I can get which of them I have selected, so it feels like I have all the information I need, but I've never been a big math guy, so I'm drawing a blank as to how to use that information to make certain my selection never goes off the screen. I'm hoping someone here will be able to help me with a simple formula or something, if there isn't an even simpler method I'm just missing.

Thanks for the help!

Product Version: Not Selected
more ▼

asked May 10 '15 at 12:27 AM in Blueprint Scripting

avatar image

28 3 5 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

There's a function called ScrollWidgetIntoView that has you pass in the widget that you want the scrollbox to display. It does what you want.

more ▼

answered Dec 17 '15 at 10:24 PM

avatar image

593 28 51 118

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi I didn't find the way to use inline nodes (function), so I made one. Maybe it will help you and save your time and efforts. alt text alt text

more ▼

answered Nov 21 '15 at 02:24 PM

avatar image

Angel Tsvetkov
277 27 37 54

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question