Пример #1
0
        // 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);
        }
Пример #2
0
        /// <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;
            }
        }
Пример #3
0
 /// <summary>
 /// Sets the data.
 /// </summary>
 /// <param name="tab">Tab.</param>
 public override void SetData(TabIcons tab)
 {
     Name.text = tab.Name;
 }
Пример #4
0
 /// <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);
 }
Пример #5
0
 /// <summary>
 /// Set data.
 /// </summary>
 /// <param name="tab">Tab.</param>
 public abstract void SetData(TabIcons tab);