mirror of
https://github.com/peng-zhihui/ElectronBot.git
synced 2026-10-26 10:11:06 +08:00
52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
namespace UIWidgets
|
|
{
|
|
using UIWidgets.Styles;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
/// <summary>
|
|
/// ProgressbarDeterminate.
|
|
/// http://ilih.ru/images/unity-assets/UIWidgets/ProgressbarDeterminate.png
|
|
/// </summary>
|
|
public class ProgressbarDeterminate : ProgressbarDeterminateBase, IUpgradeable
|
|
{
|
|
/// <summary>
|
|
/// The empty bar text.
|
|
/// </summary>
|
|
[SerializeField]
|
|
[HideInInspector]
|
|
[System.Obsolete("Replaced with EmptyBarTextAdapter.")]
|
|
public Text EmptyBarText;
|
|
|
|
/// <summary>
|
|
/// The full bar text.
|
|
/// </summary>
|
|
[SerializeField]
|
|
[HideInInspector]
|
|
[System.Obsolete("Replaced with FullBarTextAdapter.")]
|
|
public Text FullBarText;
|
|
|
|
/// <summary>
|
|
/// Upgrade this instance.
|
|
/// </summary>
|
|
public virtual void Upgrade()
|
|
{
|
|
#pragma warning disable 0612, 0618
|
|
Utilities.GetOrAddComponent(EmptyBarText, ref EmptyBarTextAdapter);
|
|
Utilities.GetOrAddComponent(FullBarText, ref FullBarTextAdapter);
|
|
#pragma warning restore 0612, 0618
|
|
}
|
|
|
|
#if UNITY_EDITOR
|
|
/// <summary>
|
|
/// Validate this instance.
|
|
/// </summary>
|
|
protected override void OnValidate()
|
|
{
|
|
base.OnValidate();
|
|
|
|
Compatibility.Upgrade(this);
|
|
}
|
|
#endif
|
|
}
|
|
} |