Improve Margin editing

This commit is contained in:
Wojtek Figat
2021-05-29 13:48:26 +02:00
parent 44433bf3b4
commit 2bdebdb2ef
6 changed files with 69 additions and 0 deletions

View File

@@ -410,6 +410,17 @@ namespace FlaxEditor.GUI.Input
Value = Value;
}
/// <summary>
/// Sets the limits from the attribute.
/// </summary>
/// <param name="limits">The limits.</param>
public void SetLimits(LimitAttribute limits)
{
_min = limits.Min;
_max = Mathf.Max(_min, limits.Max);
Value = Value;
}
/// <summary>
/// Updates the text of the textbox.
/// </summary>