Merge branch 'prog-bar-lerp-jump' of https://github.com/Tryibion/FlaxEngine into Tryibion-prog-bar-lerp-jump
This commit is contained in:
@@ -143,9 +143,11 @@ namespace FlaxEngine.GUI
|
||||
if (!Mathf.NearEqual(value, _value))
|
||||
{
|
||||
_value = value;
|
||||
if (!UseSmoothing)
|
||||
if (!UseSmoothing || _firstUpdate)
|
||||
{
|
||||
_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.")]
|
||||
public IBrush BarBrush { get; set; }
|
||||
|
||||
// Used to remove initial lerp from the value on play.
|
||||
private bool _firstUpdate = true;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ProgressBar"/> class.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user