Interface IHudTextRepresentation
A representation whose entire output is a piece of text, so it can produce its result without an engine.
Inherited Members
Namespace: Serenity.GameUi.Application.Representations
Assembly: Serenity.GameUi.Application.dll
Syntax
public interface IHudTextRepresentation : IHudRepresentation
Remarks
Split out from IHudRepresentation because only some representations can be resolved this far up: a number or a duration is a string, while a bar or a row of sprites is inherently something the renderer draws. Keeping the text ones expressible here is what lets their formatting be unit tested with no editor and no canvas.
Methods
FormatValue(CompiledHudBinding)
Renders the binding's current value as display text, or the binding's fallback when it cannot be read.
Declaration
string FormatValue(CompiledHudBinding binding)
Parameters
| Type | Name | Description |
|---|---|---|
| CompiledHudBinding | binding | The element's value binding. |
Returns
| Type | Description |
|---|---|
| string | The text to show. |