Make the video cancel hotkey configurable.
This commit is contained in:
@@ -18,6 +18,7 @@ namespace OpenRA.Widgets
|
|||||||
{
|
{
|
||||||
public class VqaPlayerWidget : Widget
|
public class VqaPlayerWidget : Widget
|
||||||
{
|
{
|
||||||
|
public Hotkey CancelKey = new Hotkey(Keycode.ESCAPE, Modifiers.None);
|
||||||
public float AspectRatio = 1.2f;
|
public float AspectRatio = 1.2f;
|
||||||
public bool DrawOverlay = true;
|
public bool DrawOverlay = true;
|
||||||
|
|
||||||
@@ -116,16 +117,11 @@ namespace OpenRA.Widgets
|
|||||||
|
|
||||||
public override bool HandleKeyPress(KeyInput e)
|
public override bool HandleKeyPress(KeyInput e)
|
||||||
{
|
{
|
||||||
if (e.Event == KeyInputEvent.Down)
|
if (Hotkey.FromKeyInput(e) != CancelKey || e.Event != KeyInputEvent.Down)
|
||||||
{
|
return false;
|
||||||
if (e.Key == Keycode.ESCAPE)
|
|
||||||
{
|
|
||||||
Stop();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
Stop();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Play()
|
public void Play()
|
||||||
|
|||||||
Reference in New Issue
Block a user