Class UnityHudNumberRepresentation
Shows the bound value as a number, with a chosen precision, zero padding and grouping.
Inheritance
UnityHudNumberRepresentation
Inherited Members
Namespace: Serenity.GameUi.Infrastructure.Representations
Assembly: Serenity.UnityGameUi.Infrastructure.dll
Syntax
public sealed class UnityHudNumberRepresentation : UnityHudTextualRepresentation, IHudTextRepresentation, IHudRepresentation
Constructors
UnityHudNumberRepresentation()
Declaration
public UnityHudNumberRepresentation()
Properties
Kind
Declaration
public override HudRepresentationKind Kind { get; }
Property Value
| Type | Description |
|---|---|
| HudRepresentationKind |
Overrides
Methods
Configure(int, int, bool)
Configures the number format. Used by the builder tool.
Declaration
public void Configure(int places, int minimumDigits, bool grouped)
Parameters
| Type | Name | Description |
|---|---|---|
| int | places | Decimal places to show. |
| int | minimumDigits | Minimum zero-padded integer digits. |
| bool | grouped | Whether to group thousands. |
FormatValue(CompiledHudBinding)
Renders the binding's current value as display text, or the binding's fallback when it cannot be read.
Declaration
public override string FormatValue(CompiledHudBinding binding)
Parameters
| Type | Name | Description |
|---|---|---|
| CompiledHudBinding | binding | The element's value binding. |
Returns
| Type | Description |
|---|---|
| string | The text to show. |