I’m creating a messages pane in UMG to show player kills and flag captures at the top right of the screen. I have a ScrollBox that I populate with MessageItem widgets that contain <Text><Image><Text> widgets to show ‘John’ <rifle weapon image> ‘Bob’
So far everything is working great but I was hoping to also use the same MessageItem widget to show flag captures so ‘John’ <flag image> ‘Flag 1’
Right now weapon textures are 64x32 and flag textures are 32x32. If I set the default MessageItem Image widget to 64x32 then it works fine for weapon textures but flag textures get stretches to 64 x 32 and appear too wide obviously.
Is there a way to set an Image widget to size itself automatically to fit its content or do I have to achieve this manually? I guess I could either make specific FlagMesageItem and WeaponMessageItem widgets or just detect inside the general message item widget if it is for a flag/weapon and resize the widget manually?