// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.GUI;
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.CustomEditors.Elements
{
///
/// The enum editor element.
///
///
public class EnumElement : LayoutElement
{
///
/// The combo box used to show enum values.
///
public EnumComboBox ComboBox;
///
/// Initializes a new instance of the class.
///
/// The enum type.
/// The custom entries layout builder. Allows to hide existing or add different enum values to editor.
/// The formatting mode.
public EnumElement(Type type, EnumComboBox.BuildEntriesDelegate customBuildEntriesDelegate = null, EnumDisplayAttribute.FormatMode formatMode = EnumDisplayAttribute.FormatMode.Default)
{
ComboBox = new EnumComboBox(type, customBuildEntriesDelegate, formatMode);
}
///
public override Control Control => ComboBox;
}
}