Fix cnc.
This commit is contained in:
@@ -328,7 +328,8 @@
|
||||
<Compile Include="Buildings\ShakeOnDeath.cs" />
|
||||
<Compile Include="Buildings\SoundOnDamageTransition.cs" />
|
||||
<Compile Include="Activities\RAHarvesterDockSequence.cs" />
|
||||
<Compile Include="Widgets\Delegates\RAInitDelegate.cs" />
|
||||
<Compile Include="Widgets\GameInitInfoWidget.cs" />
|
||||
<Compile Include="Widgets\Delegates\GameInitDelegate.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
|
||||
@@ -18,11 +18,14 @@ using System;
|
||||
|
||||
namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
{
|
||||
public class RAInitDelegate : IWidgetDelegate
|
||||
public class GameInitDelegate : IWidgetDelegate
|
||||
{
|
||||
GameInitInfoWidget Info;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public RAInitDelegate([ObjectCreator.Param] Widget widget)
|
||||
public GameInitDelegate([ObjectCreator.Param] Widget widget)
|
||||
{
|
||||
Info = widget.GetWidget<GameInitInfoWidget>("INFO");
|
||||
Game.ConnectionStateChanged += orderManager =>
|
||||
{
|
||||
Widget.CloseWindow();
|
||||
@@ -49,7 +52,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
}
|
||||
};
|
||||
|
||||
if (FileSystem.Exists("fake.mix"))
|
||||
if (FileSystem.Exists(Info.TestFile))
|
||||
ContinueLoading(widget);
|
||||
else
|
||||
{
|
||||
@@ -74,7 +77,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
{
|
||||
Process p = new Process();
|
||||
p.StartInfo.FileName = "OpenRA.Launcher.Mac/build/Release/OpenRA.app/Contents/MacOS/OpenRA";
|
||||
p.StartInfo.Arguments = "--filepicker --title \"Select CD\" --message \"Select the Red Alert CD\" --require-directory --button-text \"Select\"";
|
||||
p.StartInfo.Arguments = "--filepicker --title \"Select CD\" --message \"Select the {0} CD\" --require-directory --button-text \"Select\"".F(Info.GameTitle);
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.CreateNoWindow = true;
|
||||
p.EnableRaisingEvents = true;
|
||||
22
OpenRA.Mods.RA/Widgets/GameInitInfoWidget.cs
Executable file
22
OpenRA.Mods.RA/Widgets/GameInitInfoWidget.cs
Executable file
@@ -0,0 +1,22 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.RA.Widgets
|
||||
{
|
||||
class GameInitInfoWidget : Widget
|
||||
{
|
||||
public string TestFile;
|
||||
public string GameTitle;
|
||||
|
||||
public override void DrawInner() {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user