diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index cab84f9bc1..2463f7b8d6 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -328,7 +328,8 @@ - + + diff --git a/OpenRA.Mods.RA/Widgets/Delegates/RAInitDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs similarity index 85% rename from OpenRA.Mods.RA/Widgets/Delegates/RAInitDelegate.cs rename to OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs index 98eefae688..d5def98374 100755 --- a/OpenRA.Mods.RA/Widgets/Delegates/RAInitDelegate.cs +++ b/OpenRA.Mods.RA/Widgets/Delegates/GameInitDelegate.cs @@ -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("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; diff --git a/OpenRA.Mods.RA/Widgets/GameInitInfoWidget.cs b/OpenRA.Mods.RA/Widgets/GameInitInfoWidget.cs new file mode 100755 index 0000000000..4b67bb1e6e --- /dev/null +++ b/OpenRA.Mods.RA/Widgets/GameInitInfoWidget.cs @@ -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() {} + } +} \ No newline at end of file diff --git a/mods/cnc/bits/cursor.pal b/mods/cnc/bits/cursor.pal new file mode 100644 index 0000000000..3b29c55f5a Binary files /dev/null and b/mods/cnc/bits/cursor.pal differ diff --git a/mods/cnc/bits/mouse2.shp b/mods/cnc/bits/mouse2.shp new file mode 100644 index 0000000000..e91597f7d8 Binary files /dev/null and b/mods/cnc/bits/mouse2.shp differ diff --git a/mods/cnc/bits/mouse3.shp b/mods/cnc/bits/mouse3.shp new file mode 100644 index 0000000000..4bd614a27e Binary files /dev/null and b/mods/cnc/bits/mouse3.shp differ diff --git a/mods/cnc/bits/mouse4.shp b/mods/cnc/bits/mouse4.shp new file mode 100644 index 0000000000..dc3f01698f Binary files /dev/null and b/mods/cnc/bits/mouse4.shp differ diff --git a/mods/cnc/bits/racursor.pal b/mods/cnc/bits/racursor.pal new file mode 100644 index 0000000000..bb63fcdd50 Binary files /dev/null and b/mods/cnc/bits/racursor.pal differ diff --git a/mods/cnc/chrome/mainmenu.yaml b/mods/cnc/chrome/mainmenu.yaml index 7e78b686fb..f71f3ea0fb 100644 --- a/mods/cnc/chrome/mainmenu.yaml +++ b/mods/cnc/chrome/mainmenu.yaml @@ -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: Id:MAINMENU_BG X:(WINDOW_RIGHT - WIDTH)/2 diff --git a/mods/cnc/cursors.xml b/mods/cnc/cursors.xml deleted file mode 100644 index 6665cd99ad..0000000000 --- a/mods/cnc/cursors.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mods/cnc/cursors.yaml b/mods/cnc/cursors.yaml new file mode 100644 index 0000000000..6b1f2f0166 --- /dev/null +++ b/mods/cnc/cursors.yaml @@ -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 \ No newline at end of file diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index 896315fa36..2504229c1c 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -46,7 +46,7 @@ Sequences: mods/cnc/sequences/misc.yaml Cursors: - mods/cnc/cursors.xml + mods/cnc/cursors.yaml Chrome: mods/cnc/chrome.xml diff --git a/mods/cnc/rules/system.yaml b/mods/cnc/rules/system.yaml index c9ceaf4e3d..ab2f31f944 100644 --- a/mods/cnc/rules/system.yaml +++ b/mods/cnc/rules/system.yaml @@ -63,14 +63,6 @@ World: PaletteFromFile@effect: Name: effect Filename: temperat.pal - PaletteFromFile@cursor: - Name: cursor - Filename: temperat.pal - Transparent: no - PaletteFromFile@cursor2: - Name: cursor2 - Filename: mouse3.pal - Transparent: no PaletteFromRGBA@shadow: Name: shadow R: 0 diff --git a/mods/ra/chrome/mainmenu.yaml b/mods/ra/chrome/mainmenu.yaml index 0e2c190310..5d45c8c731 100644 --- a/mods/ra/chrome/mainmenu.yaml +++ b/mods/ra/chrome/mainmenu.yaml @@ -5,8 +5,12 @@ Background@MAINMENU_INIT: Width:250 Height:330 Visible:true - Delegate:RAInitDelegate + Delegate:GameInitDelegate Children: + GameInitInfo: + Id:INFO + TestFile: fakefile.mix + GameTitle: Red Alert Label@MAINMENU_LABEL_TITLE: Id:MAINMENU_LABEL_TITLE X:0