mirror of
https://github.com/codewriter-packages/Tri-Inspector.git
synced 2025-01-22 16:28:23 -05:00
20 lines
528 B
C#
20 lines
528 B
C#
using TriInspector.Elements;
|
|
|
|
namespace TriInspector
|
|
{
|
|
internal class ValidatorsDrawer : TriCustomDrawer
|
|
{
|
|
public override TriElement CreateElementInternal(TriProperty property, TriElement next)
|
|
{
|
|
if (!property.HasValidators)
|
|
{
|
|
return next;
|
|
}
|
|
|
|
var element = new TriElement();
|
|
element.AddChild(new TriPropertyValidationResultElement(property));
|
|
element.AddChild(next);
|
|
return element;
|
|
}
|
|
}
|
|
} |