Table of Contents

Interface IControlStateBuilder<TControlBuilder>

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

Configures the look of a control in one state: its colors, textures, border and shadow.

public interface IControlStateBuilder<out TControlBuilder>

Type Parameters

TControlBuilder

Methods

WithBorderColor(string)

Sets the color of a border drawn inside the border thickness in this state.

IControlStateBuilder<out TControlBuilder> WithBorderColor(string colorHex)

Parameters

colorHex string

Returns

IControlStateBuilder<TControlBuilder>

WithBorderThickness(int)

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

IControlStateBuilder<out TControlBuilder> WithBorderThickness(int thickness)

Parameters

thickness int

Returns

IControlStateBuilder<TControlBuilder>

WithColor(string)

Sets the color of the texture in this state.

IControlStateBuilder<out TControlBuilder> WithColor(string colorHex)

Parameters

colorHex string

Returns

IControlStateBuilder<TControlBuilder>

WithFillColor(string)

Sets a flat fill color in this state.

IControlStateBuilder<out TControlBuilder> WithFillColor(string colorHex)

Parameters

colorHex string

Returns

IControlStateBuilder<TControlBuilder>

WithFillGradient(string)

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

IControlStateBuilder<out TControlBuilder> WithFillGradient(string gradientId)

Parameters

gradientId string

Returns

IControlStateBuilder<TControlBuilder>

WithFontColor(string)

Sets the color of the text in this state.

IControlStateBuilder<out TControlBuilder> WithFontColor(string colorHex)

Parameters

colorHex string

Returns

IControlStateBuilder<TControlBuilder>

WithHorizontalThreePatchTextureReference(string)

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

IControlStateBuilder<out TControlBuilder> WithHorizontalThreePatchTextureReference(string id)

Parameters

id string

Returns

IControlStateBuilder<TControlBuilder>

WithNinePatchTextureReference(string)

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

IControlStateBuilder<out TControlBuilder> WithNinePatchTextureReference(string id)

Parameters

id string

Returns

IControlStateBuilder<TControlBuilder>

WithShadowBlur(int)

Sets the shadow's blur in pixels.

IControlStateBuilder<out TControlBuilder> WithShadowBlur(int blur)

Parameters

blur int

Returns

IControlStateBuilder<TControlBuilder>

WithShadowColor(string)

Sets the color of a soft drop shadow in this state. Nothing is drawn without it.

IControlStateBuilder<out TControlBuilder> WithShadowColor(string colorHex)

Parameters

colorHex string

Returns

IControlStateBuilder<TControlBuilder>

WithShadowOffset(int, int)

Sets how far the shadow is moved from the control, in pixels.

IControlStateBuilder<out TControlBuilder> WithShadowOffset(int x, int y)

Parameters

x int
y int

Returns

IControlStateBuilder<TControlBuilder>

WithShadowSpread(int)

Sets how much larger than the control the shadow is, in pixels. Negative values pull it in.

IControlStateBuilder<out TControlBuilder> WithShadowSpread(int spread)

Parameters

spread int

Returns

IControlStateBuilder<TControlBuilder>

WithTexture(string, string)

Sets the texture in this state from a file, under the id id.

IControlStateBuilder<out TControlBuilder> WithTexture(string id, string sourceFile)

Parameters

id string
sourceFile string

Returns

IControlStateBuilder<TControlBuilder>

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

Sets the texture in this state to one indexed texture of an atlas file.

IControlStateBuilder<out TControlBuilder> WithTextureIndexAtlas(string id, int index, string sourceFile, int eachTextureWidth, int eachTextureHeight)

Parameters

id string
index int
sourceFile string
eachTextureWidth int
eachTextureHeight int

Returns

IControlStateBuilder<TControlBuilder>

WithTextureIndexReference(string, int)

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

IControlStateBuilder<out TControlBuilder> WithTextureIndexReference(string id, int index)

Parameters

id string
index int

Returns

IControlStateBuilder<TControlBuilder>

WithTextureReference(string)

Uses a texture declared in the view's resources in this state.

IControlStateBuilder<out TControlBuilder> WithTextureReference(string id)

Parameters

id string

Returns

IControlStateBuilder<TControlBuilder>

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

Sets the texture in this state to one named region of an atlas file.

IControlStateBuilder<out TControlBuilder> 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

IControlStateBuilder<TControlBuilder>

WithTextureRegionReference(string, string)

Uses one named region of an atlas declared in the view's resources in this state.

IControlStateBuilder<out TControlBuilder> WithTextureRegionReference(string id, string regionName)

Parameters

id string
regionName string

Returns

IControlStateBuilder<TControlBuilder>