I want to have some widget (border, canvas panel etc.) with some hierarchy of children which do not take all the space of the main widget, some space is left for the 3d scene, but I want not to leave space for the 3d scene OUTSIDE the main widget, filling that space with some color or repeating texture. Is it possible and if yes, how to do it?
EDIT: placing this question into the “Blueprint” section was a mistake, I did not see section “UI” at first. Of course, preferably I want to do this with the widget designer, not the Blueprints.
o/ isn’t what You describe just nested widgets, where:
- parent widget has some padding assigned to slot where your “border/canvas” widget sits in
- under this slot sits “filler” UImage widget filling the gaps with custom graphics
and this parent widget get’s added to the screen filling it ?
Or I am missreading You here ;p
Hello. Inside the main widget there is not “filler” with custom graphics but unfilled area, that allows to show what is behind (for example, no widgets at all => 3d scene viewport). I tried child Border with color 00000000, but the parent Border color is shown.
Look into widget Retainer Box
- you pipe the whole thing into a retainer and use a material mask. Not particularly cheap but since you get to control how often this happens…
Hello. Can you post a screenshots with the widgets hierarchy and the result? Here I have the following:
Hierarchy
With white child border (color is set under Appearance - Brush Color)
With transparent child border
Where to place the Retainer Box to make inner area transparent?
P. S. Sorry for this question but I have never used that widget and have no knowledge in this area. Maybe somewhere there is a tutorial but I don’t know how to search for it.
It’s not just about placing it, it’s not a 30s job. You will need to mask it - watch a couple of tuts to get the hang of it. Depending on your setup, you may or may not need a dynamic material as well.
o/ @Everynone has it right - it comes down to masking.
You can also play with DrawAs option on brush settings:
setting it to Border allows you to customize margin. Bare in mind Border drawing is kinda funky and quite unreliable in exact results but might work for simple cases. Also mind tiling as drawing as border works similar to 9Patch
Ahah, this is clever!
Hello Everynone again. I have watched tutorials and had understood the basic aspects. I have not finished with this task yet but it has already became clear that the result will be successful. Thank you very much, you have helped me!