I’m trying to create a dialog that contains text. The dialog may contain more or less text depending on the situation. Therefore I need a text block which is multiline(not editable). Is that currently possible with UMG?
Hi TommyBear, yes that’s possible now. Except for the centering on multiple lines. The centering is done based on the size of the whole textblock. So it wont center individual lines. Sizing for elements is decided by their parent. So the text has a desired size, but the border would tell the text how much room it gets. Same goes for the border element, the border can only auto size if the container it is in permits it. So if it’s inside a canvas the canvas tells the border how big it can be, even if it wants to take up more room. So you’d need to use a flow layout panel, like placing the border inside a Vertical or Horizontal box, which will allow the border to take the room it needs but automatically align it based on the alignment rules you’ve set.
That is just awesome Jamie!! Thank you so much. Just quickly. To get the dialog automatically recentering as it resizes, should I be putting it in a vertical/horzontal panel and then centering the parent?
It’s the HAlign and VAlign of the parent slot that affects the children of that slot.
I’m not 100% sure how this translates into UMG terminology, but you’d set the parent slot of the text block to be centered, which I think is what you said.
If you do need proper center justification of your text, the rich-text block does support justification, although it’s a bit more heavy weight and perhaps not as flexible. Hopefully this situation will improve for 4.5 though.