// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;
using FlaxEngine.GUI;
namespace FlaxEditor.CustomEditors.Elements
{
///
/// The button element.
///
///
public class ButtonElement : LayoutElement
{
///
/// The button.
///
public readonly Button Button = new Button();
///
/// Initializes the element.
///
/// The text.
public void Init(string text)
{
Button.Text = text;
}
///
/// Initializes the element.
///
/// The text.
/// The color.
public void Init(string text, Color color)
{
Button.Text = text;
Button.SetColors(color);
}
///
public override Control Control => Button;
}
}