Refactor CurveEditor and KeyframesEditor to use input options.
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using FlaxEditor.CustomEditors;
|
||||
using FlaxEditor.GUI.ContextMenu;
|
||||
using FlaxEditor.Options;
|
||||
using FlaxEditor.Scripting;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
@@ -1268,33 +1269,28 @@ namespace FlaxEditor.GUI
|
||||
if (base.OnKeyDown(key))
|
||||
return true;
|
||||
|
||||
switch (key)
|
||||
InputOptions options = Editor.Instance.Options.Options.Input;
|
||||
if (options.SelectAll.Process(this))
|
||||
{
|
||||
SelectAll();
|
||||
return true;
|
||||
}
|
||||
else if (options.Delete.Process(this))
|
||||
{
|
||||
case KeyboardKeys.Delete:
|
||||
RemoveKeyframes();
|
||||
return true;
|
||||
case KeyboardKeys.A:
|
||||
if (Root.GetKey(KeyboardKeys.Control))
|
||||
{
|
||||
SelectAll();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case KeyboardKeys.C:
|
||||
if (Root.GetKey(KeyboardKeys.Control))
|
||||
{
|
||||
CopyKeyframes();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case KeyboardKeys.V:
|
||||
if (Root.GetKey(KeyboardKeys.Control))
|
||||
{
|
||||
KeyframesEditorUtils.Paste(this);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (options.Copy.Process(this))
|
||||
{
|
||||
CopyKeyframes();
|
||||
return true;
|
||||
}
|
||||
else if (options.Paste.Process(this))
|
||||
{
|
||||
KeyframesEditorUtils.Paste(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user