public class TabPanel<T> where T : struct, IConvertible
public event Action<T> onSelected;
public TabButton tabButton(T value)
return _donor.tabButton(Convert.ToInt16(value));
get { return _tabsEnum[_donor.current]; }
set { _donor.current = Convert.ToInt16(value); }
readonly TabPanel _donor;
public GameObject gameObject { get { return _donor.gameObject; } }
public TabPanel(TabPanel donor)
_tabsEnum = Utils.getEnumValues<T>();
_donor.onSelected += index => {
if (onSelected != null) {
onSelected(_tabsEnum[index]);