ServerDetailsPanel
An abstract class in Root.Township, Alta.Meta.UI.ServerManagement.
Client: base for the create server and edit server menu panels. Holds the name, description and join type inputs and shows a summary that updates as you type.
- Listed in Menus, UI and platforms
- Inherits or implements
PanelComponent - Derived types
CreateServerPanel,EditServerPanel - Nested types
ButtonData
Constructors
| Member | What it is |
|---|---|
protected ServerDetailsPanel() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|---|
protected ServerDetailsPanel.ButtonData currentType | The join type button picked, with its data and friendly name. |
protected InputField descriptionInput | The server description field. |
protected ServerDetailsPanel.ButtonData[] joinButtonData | The join type buttons with the data each stands for. |
protected ButtonCollection joinButtons | The button group for picking a join type. |
protected PanelComponent joinedServersPage | The joined servers panel. |
protected InputField nameInput | The server name field. |
protected SelectedGroupPanel selectedServerPanel | The panel for the selected server. |
3 private and internal fields
| Member | What it is |
|---|---|
private Button confirmButton | Button that runs the panel's Run task when pressed. |
private bool isRunning | True while Run is in progress, so repeat presses of the confirm button are ignored. |
private TextRenderer summaryText | Text that shows GetSummaryText, refreshed when the name, description or join type changes. |
Methods
| Member | What it is |
|---|---|
protected async void ConfirmButtonPressed(Button obj) | Runs Run when confirm is pressed, ignoring presses while one is running. |
protected abstract string GetSummaryText() | Subclasses return the summary text to show. |
protected abstract Task Run() | Subclasses create or update the server. |
protected virtual void Start() | Hooks the inputs, confirm button and join type buttons. |
protected void UpdateSummary(InputField obj) | Refreshes the summary text. |
1 private and internal method
| Member | What it is |
|---|---|
private void HandleJoinTypeChanged(ButtonCollection obj) | Sets currentType to the join button data matching the newly chosen button and refreshes the summary. |