Skip movies with `esc'
This commit is contained in:
@@ -390,9 +390,11 @@ namespace OpenRA
|
||||
orderManager.StartGame();
|
||||
}
|
||||
|
||||
public static event Action OnGameStart = () => { };
|
||||
public static event Action OnGameStart = () => {};
|
||||
public static event Action BeforeGameStart = () => {};
|
||||
internal static void StartGame()
|
||||
{
|
||||
BeforeGameStart();
|
||||
LoadMap(LobbyInfo.GlobalSettings.Map);
|
||||
if (orderManager.GameStarted) return;
|
||||
Widget.SelectedWidget = null;
|
||||
|
||||
@@ -97,6 +97,19 @@ namespace OpenRA.Widgets
|
||||
Game.Renderer.RgbaSpriteRenderer.DrawSprite(overlaySprite, videoOrigin, "chrome", videoSize);
|
||||
}
|
||||
|
||||
public override bool HandleKeyPressInner(KeyInput e)
|
||||
{
|
||||
if (e.Event == KeyInputEvent.Down)
|
||||
{
|
||||
if (e.KeyChar == 27) // Escape
|
||||
{
|
||||
Stop();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Play()
|
||||
{
|
||||
PlayThen(() => {});
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
var gameRoot = r.GetWidget("INGAME_ROOT");
|
||||
var optionsBG = gameRoot.GetWidget("INGAME_OPTIONS_BG");
|
||||
|
||||
Game.OnGameStart += () => r.OpenWindow("INGAME_ROOT");
|
||||
Game.BeforeGameStart += () => r.OpenWindow("INGAME_ROOT");
|
||||
Game.OnGameStart += () => gameRoot.GetWidget<RadarBinWidget>("INGAME_RADAR_BIN").SetWorld(Game.world);
|
||||
|
||||
r.GetWidget("INGAME_OPTIONS_BUTTON").OnMouseUp = mi => {
|
||||
|
||||
Reference in New Issue
Block a user