// create tabs TabIcons[] CreateTabs(int count) { var tabs = new TabIcons[count]; for (int i = 0; i < count; i++) { var tab_name = "Tab " + (i + 1); tabs[i] = new TabIcons() { Name = tab_name, TabObject = CreateTabObject(tab_name), }; } return(tabs); }
/// <summary> /// Sets the data. /// </summary> /// <param name="tab">Tab.</param> public override void SetData(TabIcons tab) { Name.text = tab.Name; if (Icon != null) { Icon.sprite = tab.IconActive; if (SetNativeSize) { Icon.SetNativeSize(); } Icon.color = (Icon.sprite == null) ? Color.clear : Color.white; } }
/// <summary> /// Sets the data. /// </summary> /// <param name="tab">Tab.</param> public override void SetData(TabIcons tab) { Name.text = tab.Name; }
/// <summary> /// Sets the tab icon. /// </summary> /// <param name="widget">Widget which is being modifyed</param> /// <param name="pixIcon">Icon showed when the tab is not selected</param> /// <param name="pixActiveIcon">Icon showed when the tab is selected</param> /// <param name="tooltiptext">Text to add to the tab of the widget as tooltip</param> public void SetTabIcon(Widget widget, Image pixIcon, Image pixActiveIcon, string tooltiptext, Color color = null) { TabIcons.Add(widget, new Tuple <Image, Image, Color> (pixIcon, pixActiveIcon, color)); TabToolTips.Add(widget, tooltiptext); }
/// <summary> /// Set data. /// </summary> /// <param name="tab">Tab.</param> public abstract void SetData(TabIcons tab);