Table of Contents

Interface IStyleBuilder

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

A Style resource: text settings and per-state looks that controls name with Style="id".

public interface IStyleBuilder

Methods

WithBasedOn(string)

Names another style this one builds on. Whatever this style does not set is taken from it.

IStyleBuilder WithBasedOn(string styleId)

Parameters

styleId string

Returns

IStyleBuilder

WithCheckedState(Action<IControlStateBuilder<IStyleBuilder>>)

Configures the look of a check box or radio button while checked.

IStyleBuilder WithCheckedState(Action<IControlStateBuilder<IStyleBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<IStyleBuilder>>

Returns

IStyleBuilder

WithClickedState(Action<IControlStateBuilder<IStyleBuilder>>)

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

IStyleBuilder WithClickedState(Action<IControlStateBuilder<IStyleBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<IStyleBuilder>>

Returns

IStyleBuilder

WithFocusedState(Action<IControlStateBuilder<IStyleBuilder>>)

Configures the look while a control has keyboard focus.

IStyleBuilder WithFocusedState(Action<IControlStateBuilder<IStyleBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<IStyleBuilder>>

Returns

IStyleBuilder

WithFont(string)

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

IStyleBuilder WithFont(string fontName)

Parameters

fontName string

Returns

IStyleBuilder

WithFontSize(float)

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

IStyleBuilder WithFontSize(float size)

Parameters

size float

Returns

IStyleBuilder

WithHoverState(Action<IControlStateBuilder<IStyleBuilder>>)

Configures the look while the pointer is over a control.

IStyleBuilder WithHoverState(Action<IControlStateBuilder<IStyleBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<IStyleBuilder>>

Returns

IStyleBuilder

WithLetterSpacing(float)

Sets the extra space between glyphs, in pixels. Zero keeps the control's own spacing.

IStyleBuilder WithLetterSpacing(float spacing)

Parameters

spacing float

Returns

IStyleBuilder

WithNormalState(Action<IControlStateBuilder<IStyleBuilder>>)

Configures the look of a control in its normal state.

IStyleBuilder WithNormalState(Action<IControlStateBuilder<IStyleBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<IStyleBuilder>>

Returns

IStyleBuilder

WithUncheckedState(Action<IControlStateBuilder<IStyleBuilder>>)

Configures the look of a check box or radio button while unchecked.

IStyleBuilder WithUncheckedState(Action<IControlStateBuilder<IStyleBuilder>> configure)

Parameters

configure Action<IControlStateBuilder<IStyleBuilder>>

Returns

IStyleBuilder