logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IHudTextRepresentation

    A representation whose entire output is a piece of text, so it can produce its result without an engine.

    Inherited Members
    IHudRepresentation.Kind
    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.

    In this article
    © 2026 Serenity. All Rights Reserved