x

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"

How do I change the Background Image in a Progress Bar in BP?

There is no binding under style for the progress bar. I would like to change the background image of the progress bar depending on a certain variable.

Product Version: UE 4.11
Tags:
more ▼

asked Jul 01 '16 at 06:39 PM in Blueprint Scripting

avatar image

11nova
20 6 5 9

avatar image rbmiracle Jul 01 '16 at 09:13 PM

Ditto. Trying to sort this one out myself. Don't see a function in the graph for changing anything related to this image either.

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

2 answers: sort voted first

alt textThank you for your help! I got it figured out the way I wanted it. I Went into my HUD widget event graph and used the Event Construct function to set the progress bar's widget style.

progress bar.png (68.5 kB)
more ▼

answered Jul 02 '16 at 05:12 AM

avatar image

11nova
20 6 5 9

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

So here's what I've found while digging around, maybe it can help a little bit. If you grab your progress bar and bring it into your graph, you can use a "Set Widget Style", which breaks off into three images. You can then set these images using Texture2D References >> Make SlateBrush. I'm still sorting out how exactly I want mine set up, but maybe this can push you towards the answer you're looking for.

For my example, when you select a weapon at the beginning of the game, I need it to update a few things - the progress bar's color and image set being the relevant ones here. I've got a data structure set up that carries these and about a billion other pieces of info about my weapon around to the various BPs that need to access it. So here, I'm setting my fill color and opacity (although breaking opacity off for style change), then setting widget style.

alt text

progressbar.png (244.6 kB)
more ▼

answered Jul 01 '16 at 09:35 PM

avatar image

rbmiracle
232 10 9 23

(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