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"

Making text follow handle in slider UMG Widget

I'm trying to make a hud where a text stays above a slider handle and displays the value shown. Does anyone have a solution for this?

Product Version: UE 4.18
more ▼

asked Jun 27 '18 at 10:34 PM in Blueprint Scripting

avatar image

14 2 3 10

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

1 answer: sort voted first

I've never tried this before, but I have an idea.

In the Widget's Tick event, you can get the X position of the slider handle and then set the x position of the text object to be the same. This might not give you the exact results you want if the text and slider handle are inside of different slots, however.

So you might have to get the screen coords of the handle, then project them to UMG coordinates on the Text widget and make sure the text widget is in a slot such as Canvas that will allow free positioning anywhere on the canvas.

Sorry I don't know if this will work but it's how I would begin trying.

more ▼

answered Jun 27 '18 at 10:47 PM

avatar image

3.8k 18 20 20

avatar image mightyenigma Jun 27 '18 at 10:49 PM

Another approach would be to build your own Slider using a Button or draggable element and a rectangular Border behind that, within a Horizontal Box, which would allow you to incorporate the handle and the text into the same child widget. If you take this approach you will have to build all the logic for generating and reading slider values though, and making it draggable.

avatar image Nebula Games Inc Jun 28 '18 at 02:11 AM

Yea basically what @mightyenigma said will work. Here is a video tutorial on how to do it, hope this helps!


avatar image mightyenigma Jun 28 '18 at 03:30 AM

oh nice! I'm glad my idea was a good one. Thanks for finding a tutorial

(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