Fix cnc.
This commit is contained in:
@@ -328,7 +328,8 @@
|
|||||||
<Compile Include="Buildings\ShakeOnDeath.cs" />
|
<Compile Include="Buildings\ShakeOnDeath.cs" />
|
||||||
<Compile Include="Buildings\SoundOnDamageTransition.cs" />
|
<Compile Include="Buildings\SoundOnDamageTransition.cs" />
|
||||||
<Compile Include="Activities\RAHarvesterDockSequence.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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||||
|
|||||||
@@ -18,11 +18,14 @@ using System;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA.Widgets.Delegates
|
namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||||
{
|
{
|
||||||
public class RAInitDelegate : IWidgetDelegate
|
public class GameInitDelegate : IWidgetDelegate
|
||||||
{
|
{
|
||||||
|
GameInitInfoWidget Info;
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public RAInitDelegate([ObjectCreator.Param] Widget widget)
|
public GameInitDelegate([ObjectCreator.Param] Widget widget)
|
||||||
{
|
{
|
||||||
|
Info = widget.GetWidget<GameInitInfoWidget>("INFO");
|
||||||
Game.ConnectionStateChanged += orderManager =>
|
Game.ConnectionStateChanged += orderManager =>
|
||||||
{
|
{
|
||||||
Widget.CloseWindow();
|
Widget.CloseWindow();
|
||||||
@@ -49,7 +52,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (FileSystem.Exists("fake.mix"))
|
if (FileSystem.Exists(Info.TestFile))
|
||||||
ContinueLoading(widget);
|
ContinueLoading(widget);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -74,7 +77,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
|||||||
{
|
{
|
||||||
Process p = new Process();
|
Process p = new Process();
|
||||||
p.StartInfo.FileName = "OpenRA.Launcher.Mac/build/Release/OpenRA.app/Contents/MacOS/OpenRA";
|
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.UseShellExecute = false;
|
||||||
p.StartInfo.CreateNoWindow = true;
|
p.StartInfo.CreateNoWindow = true;
|
||||||
p.EnableRaisingEvents = 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() {}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
mods/cnc/bits/cursor.pal
Normal file
BIN
mods/cnc/bits/cursor.pal
Normal file
Binary file not shown.
BIN
mods/cnc/bits/mouse2.shp
Normal file
BIN
mods/cnc/bits/mouse2.shp
Normal file
Binary file not shown.
BIN
mods/cnc/bits/mouse3.shp
Normal file
BIN
mods/cnc/bits/mouse3.shp
Normal file
Binary file not shown.
BIN
mods/cnc/bits/mouse4.shp
Normal file
BIN
mods/cnc/bits/mouse4.shp
Normal file
Binary file not shown.
BIN
mods/cnc/bits/racursor.pal
Normal file
BIN
mods/cnc/bits/racursor.pal
Normal file
Binary file not shown.
@@ -1,3 +1,49 @@
|
|||||||
|
Background@MAINMENU_INIT:
|
||||||
|
Id:MAINMENU_INIT
|
||||||
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
|
Width:250
|
||||||
|
Height:330
|
||||||
|
Visible:true
|
||||||
|
Delegate:GameInitDelegate
|
||||||
|
Children:
|
||||||
|
GameInitInfo:
|
||||||
|
Id:INFO
|
||||||
|
TestFile: fakefile.mix
|
||||||
|
GameTitle: Command & Conquer
|
||||||
|
Label@MAINMENU_LABEL_TITLE:
|
||||||
|
Id:MAINMENU_LABEL_TITLE
|
||||||
|
X:0
|
||||||
|
Y:20
|
||||||
|
Width:250
|
||||||
|
Height:25
|
||||||
|
Text:Install Game Content
|
||||||
|
Align:Center
|
||||||
|
Bold:True
|
||||||
|
Button@INIT_DOWNLOAD:
|
||||||
|
Id:INIT_DOWNLOAD
|
||||||
|
X:45
|
||||||
|
Y:70
|
||||||
|
Width:160
|
||||||
|
Height:25
|
||||||
|
Text:Download
|
||||||
|
Bold:True
|
||||||
|
Button@INIT_FROMCD:
|
||||||
|
Id:INIT_FROMCD
|
||||||
|
X:45
|
||||||
|
Y:110
|
||||||
|
Width:160
|
||||||
|
Height:25
|
||||||
|
Text:From CD
|
||||||
|
Bold:True
|
||||||
|
Button@INIT_QUIT:
|
||||||
|
Id:INIT_QUIT
|
||||||
|
X:45
|
||||||
|
Y:150
|
||||||
|
Width:160
|
||||||
|
Height:25
|
||||||
|
Text:Quit
|
||||||
|
Bold:True
|
||||||
Background@MAINMENU_BG:
|
Background@MAINMENU_BG:
|
||||||
Id:MAINMENU_BG
|
Id:MAINMENU_BG
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
|
|||||||
@@ -1,68 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<sequences>
|
|
||||||
<cursor src="mouse2" palette="cursor">
|
|
||||||
<sequence name="scroll-t" start="1" x="14" y="-2" />
|
|
||||||
<sequence name="scroll-tr" start="2" x="14" y="-2" />
|
|
||||||
<sequence name="scroll-r" start="3" x="28" y="12" />
|
|
||||||
<sequence name="scroll-br" start="4" x="28" y="22" />
|
|
||||||
<sequence name="scroll-b" start="5" x="14" y="22" />
|
|
||||||
<sequence name="scroll-bl" start="6" x="-2" y="22" />
|
|
||||||
<sequence name="scroll-l" start="7" x="-1" y="13" />
|
|
||||||
<sequence name="scroll-tl" start="8" x="-2" y="-2" />
|
|
||||||
<sequence name="scroll-t-blocked" start="130" x="14" y="-2" />
|
|
||||||
<sequence name="scroll-tr-blocked" start="131" x="14" y="-2" />
|
|
||||||
<sequence name="scroll-r-blocked" start="132" x="28" y="12" />
|
|
||||||
<sequence name="scroll-br-blocked" start="133" x="28" y="22" />
|
|
||||||
<sequence name="scroll-b-blocked" start="134" x="14" y="22" />
|
|
||||||
<sequence name="scroll-bl-blocked" start="135" x="-2" y="22" />
|
|
||||||
<sequence name="scroll-l-blocked" start="136" x="-1" y="13" />
|
|
||||||
<sequence name="scroll-tl-blocked" start="137" x="-2" y="-2" />
|
|
||||||
<sequence name="select" start="12" length="6" x="12" y="12" />
|
|
||||||
|
|
||||||
<sequence name="default" start="0" />
|
|
||||||
<sequence name="default-minimap" start="86" length="1" />
|
|
||||||
<sequence name="generic-blocked" start="9" x="12" y="12" />
|
|
||||||
<sequence name="generic-blocked-minimap" start="27" x="12" y="12" />
|
|
||||||
<sequence name="attack" start="18" length="8" x="12" y="12" />
|
|
||||||
<sequence name="attack-minimap" start="140" length="8" x="12" y="12" />
|
|
||||||
<sequence name="enter" start="119" length="3" x="12" y="12" />
|
|
||||||
<sequence name="enter-minimap" start="148" length="3" x="12" y="12" />
|
|
||||||
<sequence name="c4" start="122" length="3" x="12" y="12" />
|
|
||||||
<sequence name="c4-minimap" start="127" length="3" x="12" y="12" />
|
|
||||||
<sequence name="guard" start="153" length="1" x="12" y="12" />
|
|
||||||
<sequence name="guard-minimap" start="152" length="1" x="12" y="12" />
|
|
||||||
|
|
||||||
<!-- Need minimap cursors -->
|
|
||||||
<sequence name="deploy" start="53" length="9" x="12" y="12" />
|
|
||||||
<sequence name="repair" start="29" length="24" x="12" y="12" />
|
|
||||||
<sequence name="repair-blocked" start="126" length="1" x="12" y="12" />
|
|
||||||
<sequence name="sell" start="62" length="24" x="12" y="12" />
|
|
||||||
<sequence name="sell-blocked" start="125" length="1" x="12" y="12" />
|
|
||||||
<sequence name="ability" start="88" length="8" x="12" y="12" />
|
|
||||||
<sequence name="nuke" start="96" length="7" x="12" y="12" />
|
|
||||||
<sequence name="ioncannon" start="103" length="16" x="12" y="12" />
|
|
||||||
<sequence name="sell-vehicle" start="154" length="24" x="12" y="12" />
|
|
||||||
</cursor>
|
|
||||||
<cursor src="mouse4" palette="cursor">
|
|
||||||
<sequence name="move" start="0" length="8" x="12" y="12" />
|
|
||||||
<sequence name="move-minimap" start="9" length="4" x="12" y="12" />
|
|
||||||
</cursor>
|
|
||||||
<cursor src="attackmove" palette="cursor">
|
|
||||||
<sequence name="attackmove" start="0" length="8" x="12" y="12" />
|
|
||||||
<sequence name="attackmove-minimap" start="9" length="4" x="12" y="12" />
|
|
||||||
<sequence name="move-blocked" start="8" x="12" y="12" />
|
|
||||||
<sequence name="move-blocked-minimap" start="13" length="1" x="12" y="12" />
|
|
||||||
</cursor>
|
|
||||||
<cursor src="mouse3" palette="cursor2">
|
|
||||||
<sequence name="enter-blocked" start="212" length="1" x="12" y="12" />
|
|
||||||
<sequence name="enter-blocked-minimap" start="33" />
|
|
||||||
<sequence name="capture" start="164" length="3" x="12" y="12" />
|
|
||||||
<sequence name="capture-minimap" start="167" length="3" x="12" y="12" />
|
|
||||||
<sequence name="heal" start="160" length="4" x="12" y="12" />
|
|
||||||
<sequence name="heal-minimap" start="194" length="1" x="12" y="12" />
|
|
||||||
<sequence name="ability-minimap" start="214" length="8" x="12" y="12" />
|
|
||||||
<sequence name="deploy-blocked" start="211" length="1" x="12" y="12" />
|
|
||||||
<sequence name="goldwrench" start="170" length="24" x="12" y="12" />
|
|
||||||
<sequence name="goldwrench-blocked" start="213" length="1" x="12" y="12" />
|
|
||||||
</cursor>
|
|
||||||
</sequences>
|
|
||||||
260
mods/cnc/cursors.yaml
Normal file
260
mods/cnc/cursors.yaml
Normal file
@@ -0,0 +1,260 @@
|
|||||||
|
Palettes:
|
||||||
|
cursor: cursor.pal
|
||||||
|
cursor2: racursor.pal
|
||||||
|
|
||||||
|
|
||||||
|
Cursors:
|
||||||
|
mouse2: cursor
|
||||||
|
scroll-t:
|
||||||
|
start:1
|
||||||
|
x:14
|
||||||
|
y:-2
|
||||||
|
scroll-tr:
|
||||||
|
start:2
|
||||||
|
x:14
|
||||||
|
y:-2
|
||||||
|
scroll-r:
|
||||||
|
start:3
|
||||||
|
x:28
|
||||||
|
y:12
|
||||||
|
scroll-br:
|
||||||
|
start:4
|
||||||
|
x:28
|
||||||
|
y:22
|
||||||
|
scroll-b:
|
||||||
|
start:5
|
||||||
|
x:14
|
||||||
|
y:22
|
||||||
|
scroll-bl:
|
||||||
|
start:6
|
||||||
|
x:-2
|
||||||
|
y:22
|
||||||
|
scroll-l:
|
||||||
|
start:7
|
||||||
|
x:-1
|
||||||
|
y:13
|
||||||
|
scroll-tl:
|
||||||
|
start:8
|
||||||
|
x:-2
|
||||||
|
y:-2
|
||||||
|
scroll-t-blocked:
|
||||||
|
start:130
|
||||||
|
x:14
|
||||||
|
y:-2
|
||||||
|
scroll-tr-blocked:
|
||||||
|
start:131
|
||||||
|
x:14
|
||||||
|
y:-2
|
||||||
|
scroll-r-blocked:
|
||||||
|
start:132
|
||||||
|
x:28
|
||||||
|
y:12
|
||||||
|
scroll-br-blocked:
|
||||||
|
start:133
|
||||||
|
x:28
|
||||||
|
y:22
|
||||||
|
scroll-b-blocked:
|
||||||
|
start:134
|
||||||
|
x:14
|
||||||
|
y:22
|
||||||
|
scroll-bl-blocked:
|
||||||
|
start:135
|
||||||
|
x:-2
|
||||||
|
y:22
|
||||||
|
scroll-l-blocked:
|
||||||
|
start:136
|
||||||
|
x:-1
|
||||||
|
y:13
|
||||||
|
scroll-tl-blocked:
|
||||||
|
start:137
|
||||||
|
x:-2
|
||||||
|
y:-2
|
||||||
|
select:
|
||||||
|
start:12
|
||||||
|
length:6
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
|
||||||
|
default:
|
||||||
|
start:0
|
||||||
|
default-minimap:
|
||||||
|
start:86
|
||||||
|
length:1
|
||||||
|
generic-blocked:
|
||||||
|
start:9
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
generic-blocked-minimap:
|
||||||
|
start:27
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
attack:
|
||||||
|
start:18
|
||||||
|
length:8
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
attack-minimap:
|
||||||
|
start:140
|
||||||
|
length:8
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
enter:
|
||||||
|
start:119
|
||||||
|
length:3
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
enter-minimap:
|
||||||
|
start:148
|
||||||
|
length:3
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
c4:
|
||||||
|
start:122
|
||||||
|
length:3
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
c4-minimap:
|
||||||
|
start:127
|
||||||
|
length:3
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
guard:
|
||||||
|
start:153
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
guard-minimap:
|
||||||
|
start:152
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
|
||||||
|
# Cursors that need minimap variants
|
||||||
|
deploy:
|
||||||
|
start:53
|
||||||
|
length:9
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
repair:
|
||||||
|
start:29
|
||||||
|
length:24
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
repair-blocked:
|
||||||
|
start:126
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
sell:
|
||||||
|
start:62
|
||||||
|
length:24
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
sell-blocked:
|
||||||
|
start:125
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
ability:
|
||||||
|
start:88
|
||||||
|
length:8
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
nuke:
|
||||||
|
start:96
|
||||||
|
length:7
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
ioncannon:
|
||||||
|
start:103
|
||||||
|
length:16
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
sell-vehicle:
|
||||||
|
start:154
|
||||||
|
length:24
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
|
||||||
|
mouse4:cursor
|
||||||
|
move:
|
||||||
|
start:0
|
||||||
|
length:8
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
move-minimap:
|
||||||
|
start:9
|
||||||
|
length:4
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
|
||||||
|
attackmove:cursor
|
||||||
|
attackmove:
|
||||||
|
start:0
|
||||||
|
length:8
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
attackmove-minimap:
|
||||||
|
start:9
|
||||||
|
length:4
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
move-blocked:
|
||||||
|
start:8
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
move-blocked-minimap:
|
||||||
|
start:13
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
|
||||||
|
mouse3: cursor2
|
||||||
|
enter-blocked:
|
||||||
|
start:212
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
enter-blocked-minimap:
|
||||||
|
start:33
|
||||||
|
length:1
|
||||||
|
capture:
|
||||||
|
start:164
|
||||||
|
length:3
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
capture-minimap:
|
||||||
|
start:167
|
||||||
|
length:3
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
heal:
|
||||||
|
start:160
|
||||||
|
length:4
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
heal-minimap:
|
||||||
|
start:194
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
ability-minimap:
|
||||||
|
start:214
|
||||||
|
length:8
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
deploy-blocked:
|
||||||
|
start:211
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
goldwrench:
|
||||||
|
start:170
|
||||||
|
length:24
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
|
goldwrench-blocked:
|
||||||
|
start:213
|
||||||
|
length:1
|
||||||
|
x:12
|
||||||
|
y:12
|
||||||
@@ -46,7 +46,7 @@ Sequences:
|
|||||||
mods/cnc/sequences/misc.yaml
|
mods/cnc/sequences/misc.yaml
|
||||||
|
|
||||||
Cursors:
|
Cursors:
|
||||||
mods/cnc/cursors.xml
|
mods/cnc/cursors.yaml
|
||||||
|
|
||||||
Chrome:
|
Chrome:
|
||||||
mods/cnc/chrome.xml
|
mods/cnc/chrome.xml
|
||||||
|
|||||||
@@ -63,14 +63,6 @@ World:
|
|||||||
PaletteFromFile@effect:
|
PaletteFromFile@effect:
|
||||||
Name: effect
|
Name: effect
|
||||||
Filename: temperat.pal
|
Filename: temperat.pal
|
||||||
PaletteFromFile@cursor:
|
|
||||||
Name: cursor
|
|
||||||
Filename: temperat.pal
|
|
||||||
Transparent: no
|
|
||||||
PaletteFromFile@cursor2:
|
|
||||||
Name: cursor2
|
|
||||||
Filename: mouse3.pal
|
|
||||||
Transparent: no
|
|
||||||
PaletteFromRGBA@shadow:
|
PaletteFromRGBA@shadow:
|
||||||
Name: shadow
|
Name: shadow
|
||||||
R: 0
|
R: 0
|
||||||
|
|||||||
@@ -5,8 +5,12 @@ Background@MAINMENU_INIT:
|
|||||||
Width:250
|
Width:250
|
||||||
Height:330
|
Height:330
|
||||||
Visible:true
|
Visible:true
|
||||||
Delegate:RAInitDelegate
|
Delegate:GameInitDelegate
|
||||||
Children:
|
Children:
|
||||||
|
GameInitInfo:
|
||||||
|
Id:INFO
|
||||||
|
TestFile: fakefile.mix
|
||||||
|
GameTitle: Red Alert
|
||||||
Label@MAINMENU_LABEL_TITLE:
|
Label@MAINMENU_LABEL_TITLE:
|
||||||
Id:MAINMENU_LABEL_TITLE
|
Id:MAINMENU_LABEL_TITLE
|
||||||
X:0
|
X:0
|
||||||
|
|||||||
Reference in New Issue
Block a user