How to make a border (outline) in UMG?

I mean an actual border, outline, stroke, you name it, not the “border” widget.

Basically I want to make an outline inside a default UMG button to indicate the button is selected.

Something like this: (green is photoshopped)

Usually we do this manually(in bp graph) by setting another texture to that button.

We can technically toogle the visibility of a border overlay someway but it not very ideal especially with lot of buttons.

• if you need a lot of buttons, where doing it manually is a chore / maintenance nightmare, you can create a user widget border with a named slot and drop other user widget inside
• if you do not need to customise the bordered widgets’ hierarchy any further, you can rely on inheritance instead
• the border itself can be a 9-sliced texture (if shape / dimensions changes are needed)
• or it can be made with material - a masked Generate Rounded Box works well for this

1 Like