You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
568 B
30 lines
568 B
2 years ago
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
using System.Collections;
|
||
|
|
||
|
namespace UIWidgets {
|
||
|
/// <summary>
|
||
|
/// TabIconActiveButton.
|
||
|
/// </summary>
|
||
|
public class TabIconActiveButton : TabIconButton {
|
||
|
/// <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;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|