Table of Contents

Interface IViewBuilder

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

Builds a view in C#. The result is the same screen a view file gives.

public interface IViewBuilder : ITemplateReferenceBuilder<IViewBuilder>
Inherited Members

Methods

AddDecoration(Action<IDecorationBuilder>)

Adds a Decoration: a visual mark pinned to the view's edge, drawn outside the layout.

IViewBuilder AddDecoration(Action<IDecorationBuilder> configure)

Parameters

configure Action<IDecorationBuilder>

Returns

IViewBuilder

PopulateFromFile(string)

Takes the view from a file. False when the file could not be read as a view; the reasons are then what building the view reports, unless another file is populated in its place, which is how a caller falls back from one file to another.

bool PopulateFromFile(string fileName)

Parameters

fileName string

Returns

bool

PopulateFromUntrustedText(string, string, UntrustedViewLimits)

Takes the view from markup the game did not ship -- a server's, downloaded and never written to disk -- and holds it to what such a view may do: no resources or template references of its own, no texture files, a font only by a plain name, and no larger than limits (Default when null). False when it is refused or cannot be read; building it then reports why.

bool PopulateFromUntrustedText(string markup, string name, UntrustedViewLimits limits = null)

Parameters

markup string
name string
limits UntrustedViewLimits

Returns

bool

RootDockLayout(Action<IDockLayoutBuilder>)

Sets the view's root to a dock layout, configured by configure.

IViewBuilder RootDockLayout(Action<IDockLayoutBuilder> configure)

Parameters

configure Action<IDockLayoutBuilder>

Returns

IViewBuilder

RootGridLayout(Action<IGridLayoutBuilder>)

Sets the view's root to a grid layout, configured by configure.

IViewBuilder RootGridLayout(Action<IGridLayoutBuilder> configure)

Parameters

configure Action<IGridLayoutBuilder>

Returns

IViewBuilder

RootStackLayout(Action<IStackLayoutBuilder>)

Sets the view's root to a stack layout, configured by configure.

IViewBuilder RootStackLayout(Action<IStackLayoutBuilder> configure)

Parameters

configure Action<IStackLayoutBuilder>

Returns

IViewBuilder

WithResources(Action<ITemplateBuilder>)

Declares the view's resources: colors, strings, gradients, styles and textures.

IViewBuilder WithResources(Action<ITemplateBuilder> configure)

Parameters

configure Action<ITemplateBuilder>

Returns

IViewBuilder

WithScope(ViewScope)

What the view resolves its images' Source and its {Localize} keys against besides the game's own (ViewScope).

IViewBuilder WithScope(ViewScope scope)

Parameters

scope ViewScope

Returns

IViewBuilder