Download

Resize GridPanel Columns UMG

Hi,

In my game, my UI will have a bar with 3 sections. These sections will resize as time goes on to represent certain game states, and each one can become bigger or smaller - the bar always remains the same total length. My approach thus far was to have a GridPanel with 3 columns. My sections can then be changed in size simply by editing the “Column Fill” properties for each Column.

The problem is that I cannot seem to figure out how to do this at runtime, or how to bind these fill properties to a specific series of gameplay variables that I have.

Is this the correct approach to take? If so, what is the method by which I can change the column fill at runtime? If not, is there a more appropriate control?

Thanks!

If I’m understanding you correctly, why not just use three progress bars and set their orientation to up and down rather than left and right and fill that way? should be much easier I would think

It’s a tricky one to explain.

Imagine the horizontal progress bar represents a total duration - say, 3 seconds. The current point of the bar represents the timer as it counts up to that total duration. Now, imagine within this progress bar, there is a box overlay that suggests an “ideal”. So - if the current location of the progress bar falls within that box, then change behaviour to something else.

I’ve created an image to try and demonstrate what I mean:
f98a0078455003f0a4754b3897b1b4e993186415.png

So, the brownish background is the progress bar, and the lighter grey on top is a box that represents an underlying value. The bar’s always going to be that wide, but the overlay I want to be able to change position and width at runtime to represent various different abilities.

I’ve derived the GridPanel class in C++ into my own panel, and made a function to alter the values of the ColumnFill array - however, when these values change, the appearance does not alter. Is there a way of refreshing/rebuilding the widget?