Fix using confirm via enter key in Create Terrain dialog

This commit is contained in:
Wojtek Figat
2024-04-15 00:17:21 +02:00
parent 9c3c4fbf54
commit 0728637ce1

View File

@@ -238,24 +238,5 @@ namespace FlaxEditor.Tools.Terrain
return base.CanCloseWindow(reason);
}
/// <inheritdoc />
public override bool OnKeyDown(KeyboardKeys key)
{
if (_isWorking)
return true;
switch (key)
{
case KeyboardKeys.Escape:
OnCancel();
return true;
case KeyboardKeys.Return:
OnSubmit();
return true;
}
return base.OnKeyDown(key);
}
}
}