QuickAccessSettingsBoard
A class in Root.Township, Alta.QuickAccessActions.
Pooled settings board opened by a settings quick access action: slides down and shows pages of setting controls, one by one as it animates. Client only.
- Listed in Players and characters
- Inherits or implements
ScaleLerpPooledObject,IQuickAccessSettingsBoard - Nested types
SettingsControl
Constructors
| Member | What it is |
|---|---|
QuickAccessSettingsBoard() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
19 private and internal fields
| Member | What it is |
|---|---|
private static readonly int _Progress | Shader property ID for the board material's reveal progress. |
private List<PooledObject> activeSettings | Controls currently shown. |
private Transform animatingParent | Transform moved up and down by the animation. |
private float animationDuration | Seconds the slide takes. |
private int currentPannel | Index of the shown page. |
private float distanceBetweenSettings | Vertical gap between controls. |
private float distanceToDespawnSquared | Squared walk-away distance for CheckDistance (25, so 5 m). |
private bool isAnimating | True while sliding; page changes are ignored then. |
private Material material | The shared board material driven by the animation. |
private GameObject[] pageButtons | Next and previous page buttons, shown only with more than one page. |
private int pannelCount | Number of pages. |
private Vector3 position | World position where the board was set up, used by the distance check. |
private float pullDownBoardHeightDown | Local Y the board slides down to when shown. |
private Renderer[] renderers | Renderers that share the board material. |
private SettingsQuickAccessMenu settings | The settings menu action that opened the board. |
private int settingsInPanel | Number of controls on the page being shown. |
private Transform settingsParent | Where the controls are spawned. |
private int settingsPerBoard | Settings per page. |
private List<SettingsFieldAccess> settingsToDisplay | The valid settings to show, across all pages. |
Properties
| Member | What it is |
|---|---|
Transform Transform { get; } | The board's transform. |
Events
| Member | What it is |
|---|---|
event Action DistanceDisabled | Raised when the player walks away from the board; the settings menu action uses it to drop the board. |
Methods
| Member | What it is |
|---|---|
void NextPanel() | Hides the current page and shows the next, wrapping round. Ignored while animating. |
void PreviousPanel() | Hides the current page and shows the previous, wrapping round. Ignored while animating. |
override void Release() | Plays the hide animation, then returns the board to its pool. |
void Setup(SettingsQuickAccessMenu settings) | Loads the valid settings from the menu action, works out pages, shows page buttons if there are several and opens the first page. |
protected override void Awake() | Makes one tracked material copy and shares it across all the board's renderers. |