Add spacebar for play/pause in animated model and particles previews
This commit is contained in:
@@ -428,8 +428,12 @@ namespace FlaxEditor.Viewport.Previews
|
||||
case KeyboardKeys.F:
|
||||
// Pay respect..
|
||||
ViewportCamera.SetArcBallView(_previewModel.Box);
|
||||
break;
|
||||
return true;
|
||||
case KeyboardKeys.Spacebar:
|
||||
PlayAnimation = !PlayAnimation;
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnKeyDown(key);
|
||||
}
|
||||
|
||||
|
||||
@@ -264,6 +264,16 @@ namespace FlaxEditor.Viewport.Previews
|
||||
/// <inheritdoc />
|
||||
public override bool OnKeyDown(KeyboardKeys key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
case KeyboardKeys.F:
|
||||
ViewportCamera.SetArcBallView(_previewEffect.Box);
|
||||
return true;
|
||||
case KeyboardKeys.Spacebar:
|
||||
PlaySimulation = !PlaySimulation;
|
||||
return true;
|
||||
}
|
||||
|
||||
var inputOptions = Editor.Instance.Options.Options.Input;
|
||||
if (inputOptions.Play.Process(this, key))
|
||||
{
|
||||
@@ -275,6 +285,7 @@ namespace FlaxEditor.Viewport.Previews
|
||||
PlaySimulation = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnKeyDown(key);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user