Files
peng-zhihui 06ec2e469e Released.
2022-03-13 06:31:07 +08:00

32 lines
586 B
C#

namespace UIWidgets
{
using UIWidgets.l10n;
using UnityEngine;
/// <summary>
/// TabIconActiveButton.
/// </summary>
public class TabIconActiveButton : TabIconButton
{
/// <summary>
/// Sets the data.
/// </summary>
/// <param name="tab">Tab.</param>
public override void SetData(TabIcons tab)
{
NameAdapter.text = Localization.GetTranslation(tab.Name);
if (Icon != null)
{
Icon.sprite = tab.IconActive;
if (SetNativeSize)
{
Icon.SetNativeSize();
}
Icon.color = (Icon.sprite == null) ? Color.clear : Color.white;
}
}
}
}