//********************************** Banshee Engine (www.banshee3d.com) **************************************************//
//**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************//
using System;
using bs;
namespace bs.Editor
{
/** @addtogroup Library
* @{
*/
///
/// Opens up a window that allows the user to select a field to animate using the animation editor.
/// See .
///
[DefaultSize(250, 350)]
internal class FieldSelectionWindow : DropDownWindow
{
private GUIFieldSelector guiFieldSelector;
public Action OnFieldSelected;
///
/// Constructs the drop down window.
///
public FieldSelectionWindow()
{
guiFieldSelector = new GUIFieldSelector(GUI, Selection.SceneObject, Width, Height);
guiFieldSelector.OnElementSelected += (so, comp, path, type) =>
{
OnFieldSelected?.Invoke(path, type);
Close();
};
}
}
/** @} */
}