Update Cryville.Common.

This commit is contained in:
2022-10-14 23:32:43 +08:00
parent d3cac8a28d
commit c8eee7ab3f
18 changed files with 497 additions and 47 deletions

View File

@@ -2,16 +2,27 @@
using UnityEngine.UI;
namespace Cryville.Common.Unity.UI {
/// <summary>
/// A non-interactive <see cref="Slider" /> that has an internal tweening behaviour.
/// </summary>
public class ProgressBar : Slider {
[SerializeField][Range(0f, 1f)]
[Tooltip("The tweening parameter.")]
float m_smooth = 0;
/// <summary>
/// The tweening parameter.
/// </summary>
public float Smooth {
get { return m_smooth; }
set { m_smooth = value; }
}
[SerializeField]
[Tooltip("The target value.")]
float m_targetValue;
/// <summary>
/// Gets the current displayed value or sets the target value.
/// </summary>
public override float value {
get { return base.value; }
set { m_targetValue = value; }