A class in Root.Township, Alta.Meta.UI.
One page of a meta UI Window. Shows or hides itself, playing an optional scale animation, and raises StateChanged.
Constructors
| Member | What it is |
|---|
Panel() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|
protected static Logger logger | NLog logger shared by panels. |
2 private and internal fields
| Member | What it is |
|---|
private CurveScaler animation | Scaler animation used to show and hide the panel; without one it toggles after 50 ms. |
private Window window | Backing field for Window. |
Properties
| Member | What it is |
|---|
bool IsActive { get; private set; } | Whether the panel is currently shown. |
Window Window { get; } | The window that owns this panel. |
Events
| Member | What it is |
|---|
event Action<Panel> StateChanged | Raised when the panel is shown or hidden. |
Methods
| Member | What it is |
|---|
void SetActive(bool state) | Shows or hides the panel and raises StateChanged. Logs a warning and does nothing if already in that state. |
void SetActive(bool state, Action onFinished = null) | Shows or hides the panel and raises StateChanged. Logs a warning and does nothing if already in that state. |
void SwitchTo() | Asks the parent window to switch to this panel. |
protected virtual async void InternalSetState(bool state, Action onFinished = null) | Turns the object on or off, through the animation if set, otherwise after a 50 ms delay, then calls the finish callback. |
Used in
Members of other types that take, return or hold a Panel:
NavigateTo.panel, PanelComponent.HandlePanelStateChange, PanelComponent.HandleStateChange, PanelComponent.panel, PanelComponent.Panel, APIStatusNotification.APIStatusNotification, CreateGroupInfoPanel.HandleStateChange, CreateGroupInfoPanel.showWhenActive, EditServerPanel.firstPanel, FriendRequestNotification.FriendRequestNotification, FriendsListPanel.HandleStateChange, GroupInviteNotification.GroupInviteNotification, LoggedInWindow.loggedInPanel, PlayerReportBaseNotification.PlayerReportBaseNotification, PlayerReportNotification.PlayerReportNotification, PlayerReportSummaryNotification.PlayerReportSummaryNotification, SelectedGroupPanel.panel, UINotification.panel, UINotification.UINotification, TabletToggle.home, TabletToggle.homeExtended, Window.CurrentPanel, Window.CurrentPopup, Window.FinishPopupSwitch, Window.FinishSwitch, Window.ShowAsPopup, Window.startingPanel, Window.SwitchToPanel, RecentPlayersPage.HandleStateChange, RecentPlayerActionPage.banSentPage, RecentPlayerActionPage.friendRemovalSentPage, RecentPlayerActionPage.friendRequestAcceptSentPage, RecentPlayerActionPage.friendRequestDenySentPage, RecentPlayerActionPage.friendRequestSentPage, RecentPlayerActionPage.reportSentPage, RecentPlayerActionPage.unBanSentPage.