logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IHudBinding

    Describes where a HUD element reads one value from: a source object, plus the chain of member reads that turns it into the displayed value.

    Namespace: Serenity.GameUi.Domain.Interfaces
    Assembly: Serenity.GameUi.Domain.dll
    Syntax
    public interface IHudBinding

    Properties

    FallbackText

    What to display when the chain cannot be evaluated — the service is not registered yet, a reference is missing, or a step returned null.

    Declaration
    string FallbackText { get; }
    Property Value
    Type Description
    string
    Remarks

    A HUD binds through reflection, so it must degrade visibly rather than throw every frame. The diagnostics overlay sets the precedent by showing "n/a" until its service is up.

    SourceKind

    How the source object is obtained.

    Declaration
    HudBindingSourceKind SourceKind { get; }
    Property Value
    Type Description
    HudBindingSourceKind

    SourceTypeName

    The assembly-qualified name of the source type. Identifies the service contract for SERVICE and the declaring type for STATIC; ignored for the directly-referenced kinds.

    Declaration
    string SourceTypeName { get; }
    Property Value
    Type Description
    string

    Steps

    The member reads applied in order to the resolved source object.

    Declaration
    IReadOnlyList<IHudMemberStep> Steps { get; }
    Property Value
    Type Description
    IReadOnlyList<IHudMemberStep>

    ValueTransform

    How the value this binding reads is reshaped before any representation sees it.

    Declaration
    HudValueTransform ValueTransform { get; }
    Property Value
    Type Description
    HudValueTransform
    Remarks

    Carried per binding rather than per element: a gauge's value and capacity bindings each need their own transform, since reshaping both sides identically would break the ratio between them.

    In this article
    © 2026 Serenity. All Rights Reserved