Table of Contents

Interface IDecorationBuilder

Namespace
BSGameLib.UI.Builder
Assembly
BSGameLib.UI.dll

A purely visual mark pinned to a corner or edge of the view, the same as a Decoration in view.xsd. It sits outside the layout and takes no space in it.

public interface IDecorationBuilder

Methods

WithAnchor(DecorationAnchor)

Sets the corner or edge of the view the decoration is pinned to.

IDecorationBuilder WithAnchor(DecorationAnchor anchor)

Parameters

anchor DecorationAnchor

Returns

IDecorationBuilder

WithBorderColor(string)

Sets the color of a border drawn inside the border thickness.

IDecorationBuilder WithBorderColor(string colorHex)

Parameters

colorHex string

Returns

IDecorationBuilder

WithBorderThickness(int)

Sets the border's width in pixels. Has no effect without a border color.

IDecorationBuilder WithBorderThickness(int thickness)

Parameters

thickness int

Returns

IDecorationBuilder

WithFillColor(string)

Sets a flat fill color.

IDecorationBuilder WithFillColor(string colorHex)

Parameters

colorHex string

Returns

IDecorationBuilder

WithFillGradient(string)

Sets a gradient fill, naming a Gradient resource. Drawn in place of the fill color when both are set.

IDecorationBuilder WithFillGradient(string gradientId)

Parameters

gradientId string

Returns

IDecorationBuilder

WithHorizontalThreePatchTextureReference(string)

Uses a horizontal three-patch texture declared in the view's resources.

IDecorationBuilder WithHorizontalThreePatchTextureReference(string id)

Parameters

id string

Returns

IDecorationBuilder

WithLayer(DecorationLayer)

Sets whether the decoration is painted behind the controls or over them.

IDecorationBuilder WithLayer(DecorationLayer layer)

Parameters

layer DecorationLayer

Returns

IDecorationBuilder

WithNinePatchTextureReference(string)

Uses a nine-patch texture declared in the view's resources.

IDecorationBuilder WithNinePatchTextureReference(string id)

Parameters

id string

Returns

IDecorationBuilder

WithOffset(int, int)

Sets the distance in pixels inward from the anchor.

IDecorationBuilder WithOffset(int x, int y)

Parameters

x int
y int

Returns

IDecorationBuilder

WithSize(int, int)

Sets the decoration's size in pixels. Needed unless the decoration stretches to cover the view.

IDecorationBuilder WithSize(int width, int height)

Parameters

width int
height int

Returns

IDecorationBuilder

WithStretch(bool)

Sets whether the decoration covers the whole view, ignoring the anchor, offset and size.

IDecorationBuilder WithStretch(bool stretch)

Parameters

stretch bool

Returns

IDecorationBuilder

WithTexture(string, string)

Sets a texture drawn over the decoration, from a file under the id id.

IDecorationBuilder WithTexture(string id, string sourceFile)

Parameters

id string
sourceFile string

Returns

IDecorationBuilder

WithTextureColor(string)

Sets the tint applied to the texture, if one is set.

IDecorationBuilder WithTextureColor(string colorHex)

Parameters

colorHex string

Returns

IDecorationBuilder

WithTextureIndexAtlas(string, int, string, int, int)

Sets the texture to one indexed texture of an atlas file.

IDecorationBuilder WithTextureIndexAtlas(string id, int index, string sourceFile, int eachTextureWidth, int eachTextureHeight)

Parameters

id string
index int
sourceFile string
eachTextureWidth int
eachTextureHeight int

Returns

IDecorationBuilder

WithTextureIndexReference(string, int)

Uses one indexed texture of an atlas declared in the view's resources.

IDecorationBuilder WithTextureIndexReference(string id, int index)

Parameters

id string
index int

Returns

IDecorationBuilder

WithTextureReference(string)

Uses a texture declared in the view's resources.

IDecorationBuilder WithTextureReference(string id)

Parameters

id string

Returns

IDecorationBuilder

WithTextureRegionAtlas(string, string, string, int, int, int, int)

Sets the texture to one named region of a texture atlas file.

IDecorationBuilder WithTextureRegionAtlas(string id, string sourceFile, string regionId, int x, int y, int width, int height)

Parameters

id string
sourceFile string
regionId string
x int
y int
width int
height int

Returns

IDecorationBuilder

WithTextureRegionReference(string, string)

Uses one named region of a texture atlas declared in the view's resources.

IDecorationBuilder WithTextureRegionReference(string id, string regionName)

Parameters

id string
regionName string

Returns

IDecorationBuilder