Table of Contents

Interface ILabelBuilder

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

A label, the Label element of a view file, built in C#.

public interface ILabelBuilder : IControlBuilder<ILabelBuilder>
Inherited Members

Methods

AlignCenter()

Aligns the text to the center of the label.

ILabelBuilder AlignCenter()

Returns

ILabelBuilder

AlignLeft()

Aligns the text to the left of the label.

ILabelBuilder AlignLeft()

Returns

ILabelBuilder

AlignRight()

Aligns the text to the right of the label.

ILabelBuilder AlignRight()

Returns

ILabelBuilder

BindText(Action<IControlTextBindingBuilder<ILabelBuilder>>)

Binds the text, with the binding set up by configure. Same result as BindText(string).

ILabelBuilder BindText(Action<IControlTextBindingBuilder<ILabelBuilder>> configure)

Parameters

configure Action<IControlTextBindingBuilder<ILabelBuilder>>

Returns

ILabelBuilder

BindText(string)

Binds the text to the view model property propertyName.

ILabelBuilder BindText(string propertyName)

Parameters

propertyName string

Returns

ILabelBuilder

NoWrap()

Keeps the text on one line, even when it is wider than the label.

ILabelBuilder NoWrap()

Returns

ILabelBuilder

WithBorderColor(string)

Sets the color of a border drawn around the label's bounds.

ILabelBuilder WithBorderColor(string colorHex)

Parameters

colorHex string

Returns

ILabelBuilder

WithBorderThickness(int)

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

ILabelBuilder WithBorderThickness(int thickness)

Parameters

thickness int

Returns

ILabelBuilder

WithColor(string)

Sets the color of the text.

ILabelBuilder WithColor(string colorHex)

Parameters

colorHex string

Returns

ILabelBuilder

WithFillColor(string)

Sets a flat fill drawn behind the text.

ILabelBuilder WithFillColor(string colorHex)

Parameters

colorHex string

Returns

ILabelBuilder

WithFillGradient(string)

Sets a gradient fill drawn behind the text, naming a Gradient resource.

ILabelBuilder WithFillGradient(string gradientId)

Parameters

gradientId string

Returns

ILabelBuilder

WithFont(string)

Sets the font for the text: a BMFont (.fnt) or TrueType (.ttf/.otf) file.

ILabelBuilder WithFont(string fontName)

Parameters

fontName string

Returns

ILabelBuilder

WithFontSize(float)

Sets the point size of the text. Zero keeps the font's own size.

ILabelBuilder WithFontSize(float size)

Parameters

size float

Returns

ILabelBuilder

WithLetterSpacing(float)

Sets the extra space between glyphs, in pixels.

ILabelBuilder WithLetterSpacing(float spacing)

Parameters

spacing float

Returns

ILabelBuilder

WithSize(int, int)

Sets the label's size in pixels.

ILabelBuilder WithSize(int width, int height)

Parameters

width int
height int

Returns

ILabelBuilder

WithText(string)

Sets the text. A "{Localize key}" shows that key's text in the current language.

ILabelBuilder WithText(string text)

Parameters

text string

Returns

ILabelBuilder

Wrap()

Wraps the text onto further lines when it is wider than the label.

ILabelBuilder Wrap()

Returns

ILabelBuilder