Skip to main content

TabbedPanel

A class in Root.Township, Alta.Meta.UI.

A UI Panel with a set of Tabs, one active at a time. Client UI.

Constructors​

MemberWhat it is
TabbedPanel()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

5 private and internal fields
MemberWhat it is
private bool alwaysReturnToStartIf true (default), the panel goes back to the starting tab every time it is enabled.
private bool isSwitchingToStartWhether the next OnEnable should switch to the starting tab.
private static readonly Logger loggerNLog logger for this class.
private int startingTabIndex in tabs of the tab shown first.
private Tab[] tabsThe tabs this panel can switch between.

Properties​

MemberWhat it is
Tab CurrentTab { get; private set; }The tab that is active now.

Methods​

MemberWhat it is
void SwitchToTab(Tab tab)Closes the window's popups, deactivates the current tab and activates the given one. Logs an error if the tab isn't in tabs.
2 private and internal methods
MemberWhat it is
private void OnEnable()Switches to the starting tab; only the first time unless alwaysReturnToStart is set.
private void IBuildRendererPostBake.PostBake()Build step that removes null entries from tabs.