Tweaks and improvements for curves editing

#519
This commit is contained in:
Wojtek Figat
2021-08-04 16:35:19 +02:00
parent 41b7897857
commit fc8c8b5c25
7 changed files with 98 additions and 72 deletions

View File

@@ -182,6 +182,19 @@ namespace FlaxEngine.GUI
_orientation = orientation;
}
/// <summary>
/// Cuts the scroll bar value smoothing and imminently goes to the target scroll value.
/// </summary>
public void FastScroll()
{
if (!Mathf.NearEqual(_value, _targetValue))
{
_value = _targetValue;
SetUpdate(ref _update, null);
OnValueChanged();
}
}
/// <summary>
/// Scrolls the view to the desire range (favors minimum value if cannot cover whole range in a bounds).
/// </summary>