Hi,
I just noticed today that in UMG widgets I am getting really strange behavior when setting the “Draw As” parameter of a button to “Border”. From my understanding the Border option is supposed to draw a border around the button, in fact that is what the tooltip even says it is supposed to do. Instead when I select border I am getting an image appearing on hover. This is in a vanilla project first person template with a newly created widget blueprint. This is what it looks like when I hover over the button:
I’ve also tried actually using a “border” widget and although I don’t get the strange images showing up, I’m not getting a border either. No border shows up at all. Am I just using this feature incorrectly? If so it isn’t very straight forward. Any help would be appreciated. I can work around the problem by creating borders with image files, but would prefer not to if I don’t have to.
I had some success by setting the margins. When you have Draw As Border you need to set the Margin values or the image will not show up. I’m still puzzled as why in my case I need to set the margin as 0.5 on certain sides to make it appear correct… If anyone has a full working example will be nice to have it described.
the drawAs Border method inside the Button style is not drawing a border on top of the button… Everything in the button style tab is meant to directly modify the image of the button.
to have a border hovering your button, you need to wrap your button with an Overlay and add an Image with drawAs border/box (depends on your image) below it (in the hierarchy below… to draw on top)
then select the button and add OnHovered and OnUnhovered Events to make thw birder image NonHittest or collapsed when hovered/unhovered.