Class LeaderboardButtonFocus
Which of a leaderboard view's buttons currently has focus, and the rules for moving it: wraps at either end and skips any button whose Placement is Hidden. Pure list bookkeeping — no Unity input is polled here; LeaderboardButtonBar owns that and calls into this class.
Inherited Members
Namespace: Serenity.Leaderboard.Infrastructure.Views
Assembly: Serenity.UnityLeaderboard.Infrastructure.dll
Syntax
public sealed class LeaderboardButtonFocus
Constructors
LeaderboardButtonFocus(IReadOnlyList<LeaderboardButtonHandle>)
Declaration
public LeaderboardButtonFocus(IReadOnlyList<LeaderboardButtonHandle> handles)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<LeaderboardButtonHandle> | handles |
Properties
Current
The currently focused handle, or null when nothing is focused (before FocusFirst(), after Blur(), or with no selectable button).
Declaration
public LeaderboardButtonHandle Current { get; }
Property Value
| Type | Description |
|---|---|
| LeaderboardButtonHandle |
Methods
Blur()
Clears focus without moving it elsewhere.
Declaration
public void Blur()
FocusFirst()
Focuses the first non-hidden button. A no-op with no selectable button.
Declaration
public void FocusFirst()
MoveFocus(int)
Moves focus by delta steps (1 = next, -1 = previous), wrapping at either end and
skipping every hidden button. A no-op when there is no selectable button to land on.
Declaration
public void MoveFocus(int delta)
Parameters
| Type | Name | Description |
|---|---|---|
| int | delta |