Merge branch 'Tryibion-prog-bar-lerp-jump'
This commit is contained in:
@@ -143,9 +143,11 @@ namespace FlaxEngine.GUI
|
|||||||
if (!Mathf.NearEqual(value, _value))
|
if (!Mathf.NearEqual(value, _value))
|
||||||
{
|
{
|
||||||
_value = value;
|
_value = value;
|
||||||
if (!UseSmoothing)
|
if (!UseSmoothing || _firstUpdate)
|
||||||
{
|
{
|
||||||
_current = _value;
|
_current = _value;
|
||||||
|
if (_firstUpdate)
|
||||||
|
_firstUpdate = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,6 +171,9 @@ namespace FlaxEngine.GUI
|
|||||||
[EditorDisplay("Bar Style"), EditorOrder(2012), Tooltip("The brush used for progress bar drawing.")]
|
[EditorDisplay("Bar Style"), EditorOrder(2012), Tooltip("The brush used for progress bar drawing.")]
|
||||||
public IBrush BarBrush { get; set; }
|
public IBrush BarBrush { get; set; }
|
||||||
|
|
||||||
|
// Used to remove initial lerp from the value on play.
|
||||||
|
private bool _firstUpdate = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ProgressBar"/> class.
|
/// Initializes a new instance of the <see cref="ProgressBar"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user