Make the video cancel hotkey configurable.

This commit is contained in:
Paul Chote
2014-10-08 20:33:06 +13:00
parent 6b1505b71d
commit a60452b30a

View File

@@ -18,6 +18,7 @@ namespace OpenRA.Widgets
{
public class VqaPlayerWidget : Widget
{
public Hotkey CancelKey = new Hotkey(Keycode.ESCAPE, Modifiers.None);
public float AspectRatio = 1.2f;
public bool DrawOverlay = true;
@@ -116,16 +117,11 @@ namespace OpenRA.Widgets
public override bool HandleKeyPress(KeyInput e)
{
if (e.Event == KeyInputEvent.Down)
{
if (e.Key == Keycode.ESCAPE)
{
Stop();
return true;
}
}
if (Hotkey.FromKeyInput(e) != CancelKey || e.Event != KeyInputEvent.Down)
return false;
return false;
Stop();
return true;
}
public void Play()