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

@@ -1,5 +1,7 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;
namespace FlaxEditor.CustomEditors.Elements
{
/// <summary>
@@ -16,5 +18,11 @@ namespace FlaxEditor.CustomEditors.Elements
/// Gets a value indicating whether user is using a slider.
/// </summary>
bool IsSliding { get; }
/// <summary>
/// Sets the editor limits from member <see cref="LimitAttribute"/>.
/// </summary>
/// <param name="limit">The limit.</param>
void SetLimits(LimitAttribute limit);
}
}

View File

@@ -76,5 +76,14 @@ namespace FlaxEditor.CustomEditors.Elements
/// <inheritdoc cref="IFloatValueEditor.IsSliding" />
public bool IsSliding => Slider.IsSliding;
/// <inheritdoc />
public void SetLimits(LimitAttribute limit)
{
if (limit != null)
{
Slider.SetLimits(limit);
}
}
}
}