Table of Contents

Interface ITextInputBuilder<TBuilder>

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

What a text box and a password box share: the same attributes, and the same states.

public interface ITextInputBuilder<out TBuilder> : IControlBuilder<TBuilder>

Type Parameters

TBuilder
Inherited Members

Methods

AllowOnlyNumbers(bool)

Sets whether only numeric characters can be typed, as the RestrictToNumbers attribute does.

TBuilder AllowOnlyNumbers(bool restrictToNumbers = true)

Parameters

restrictToNumbers bool

Returns

TBuilder

BindText(Action<IControlTextBindingBuilder<TBuilder>>)

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

TBuilder BindText(Action<IControlTextBindingBuilder<out TBuilder>> configure)

Parameters

configure Action<IControlTextBindingBuilder<TBuilder>>

Returns

TBuilder

BindText(string)

Binds the text to the view model property propertyName.

TBuilder BindText(string propertyName)

Parameters

propertyName string

Returns

TBuilder

WithClickedState(Action<IControlStateBuilder<TBuilder>>)

Configures the look while the control is pressed with the mouse.

TBuilder WithClickedState(Action<IControlStateBuilder<out TBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<TBuilder>>

Returns

TBuilder

WithFocusedState(Action<IControlStateBuilder<TBuilder>>)

Configures the look while the control has keyboard focus.

TBuilder WithFocusedState(Action<IControlStateBuilder<out TBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<TBuilder>>

Returns

TBuilder

WithFont(string)

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

TBuilder WithFont(string fontName)

Parameters

fontName string

Returns

TBuilder

WithFontSize(float)

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

TBuilder WithFontSize(float size)

Parameters

size float

Returns

TBuilder

WithHoverState(Action<IControlStateBuilder<TBuilder>>)

Configures the look while the pointer is over the control.

TBuilder WithHoverState(Action<IControlStateBuilder<out TBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<TBuilder>>

Returns

TBuilder

WithLabel(string)

Sets a label shown with the control. A "{Localize key}" shows that key's text in the current language.

TBuilder WithLabel(string label)

Parameters

label string

Returns

TBuilder

WithNormalState(Action<IControlStateBuilder<TBuilder>>)

Configures the look in the normal state.

TBuilder WithNormalState(Action<IControlStateBuilder<out TBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<TBuilder>>

Returns

TBuilder

WithSize(int, int)

Sets the control's size in pixels.

TBuilder WithSize(int width, int height)

Parameters

width int
height int

Returns

TBuilder

WithText(string)

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

TBuilder WithText(string text)

Parameters

text string

Returns

TBuilder