logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardViewButton

    One authored button rendered on a leaderboard view: what it says, what it does when submitted, and where it sits. Siblings of the header/rows/empty-state elements, but placed and matched independently of LeaderboardViewElement — a view can author any number of buttons, so they live in Buttons as a list rather than one-per-enum-member.

    Inheritance
    object
    LeaderboardViewButton
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Leaderboard.Infrastructure.Settings
    Assembly: Serenity.UnityLeaderboard.Infrastructure.dll
    Syntax
    public class LeaderboardViewButton

    Constructors

    LeaderboardViewButton()

    Declaration
    public LeaderboardViewButton()

    Properties

    Action

    What happens when this button is submitted.

    Declaration
    public LeaderboardButtonAction Action { get; }
    Property Value
    Type Description
    LeaderboardButtonAction

    Id

    Stable identifier for this button.

    Declaration
    public string Id { get; }
    Property Value
    Type Description
    string

    Label

    Text shown on the button.

    Declaration
    public string Label { get; }
    Property Value
    Type Description
    string

    OnSubmitSignals

    Signals dispatched when Action is DISPATCH_SIGNAL. Never null.

    Declaration
    public List<EventDispatcherSignal> OnSubmitSignals { get; }
    Property Value
    Type Description
    List<EventDispatcherSignal>

    Placement

    Where this button sits. Materialized to NewButtonPlacement() on first access when this button predates the field (or was authored through a path that left it null) — the same lazily-filled contract ResolvePlacement(LeaderboardViewElement) guarantees for the three fixed elements. The returned placement's own Element field is unused: a button is matched by its position in Buttons, not by LeaderboardViewElement — the owner (the panel/factory pairing it with a rect) already knows which button it belongs to.

    Declaration
    public LeaderboardElementPlacement Placement { get; }
    Property Value
    Type Description
    LeaderboardElementPlacement

    TargetViewId

    View id shown when Action is SHOW_VIEW.

    Declaration
    public string TargetViewId { get; }
    Property Value
    Type Description
    string

    Methods

    SetAction(LeaderboardButtonAction)

    Sets the button's action. Used by the Leaderboard View Designer.

    Declaration
    public void SetAction(LeaderboardButtonAction value)
    Parameters
    Type Name Description
    LeaderboardButtonAction value

    SetId(string)

    Sets the button's stable identifier. Used by the Leaderboard View Designer.

    Declaration
    public void SetId(string value)
    Parameters
    Type Name Description
    string value

    SetLabel(string)

    Sets the button's label. Used by the Leaderboard View Designer.

    Declaration
    public void SetLabel(string value)
    Parameters
    Type Name Description
    string value

    SetTargetViewId(string)

    Sets the view id shown for Action Show View. Used by the Leaderboard View Designer.

    Declaration
    public void SetTargetViewId(string value)
    Parameters
    Type Name Description
    string value
    In this article
    © 2026 Serenity. All Rights Reserved