Box
Standard styled container combining background color, texture, shader, border, radius, and child layout.
Overview
Box is the standard concrete visual container in UniGUI. It extends SurfaceWidget<Box> and has surface rendering active by default.
Use Box whenever you need a styled card, panel, background wrapper, or modal container.
Card with Border and Radius
Box card = new Box()
.background(ColorView.ofHex("#2C2F33"))
.border(ColorView.ofHex("#7289DA"))
.borderWidth(2.0f)
.radius(8.0f);
card.addChild(titleLabel);
Related links
API
Box()
Constructor
Creates an empty Box container with visual surface enabled.