diff --git a/OpenRA.Game/ContentInstaller.cs b/OpenRA.Game/ContentInstaller.cs new file mode 100644 index 0000000000..49763093d2 --- /dev/null +++ b/OpenRA.Game/ContentInstaller.cs @@ -0,0 +1,37 @@ +#region Copyright & License Information +/* + * Copyright 2007-2015 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 COPYING. + */ +#endregion + +using System.Collections.Generic; + +namespace OpenRA +{ + // Referenced from ModMetadata, so needs to be in OpenRA.Game :( + public class ContentInstaller : IGlobalModData + { + public readonly string[] TestFiles = { }; + public readonly string[] DiskTestFiles = { }; + public readonly string PackageToExtractFromCD = null; + public readonly bool OverwriteFiles = true; + + public readonly Dictionary CopyFilesFromCD = new Dictionary(); + public readonly Dictionary ExtractFilesFromCD = new Dictionary(); + + public readonly string PackageMirrorList = null; + + public readonly string MusicPackageMirrorList = null; + public readonly int ShippedSoundtracks = 0; + + /// InstallShield .CAB file IDs, used to extract Mod-specific files. + public readonly HashSet InstallShieldCABFileIds = new HashSet(); + + /// InstallShield .CAB file IDs, used to extract Mod-specific archives and extract contents of ExtractFilesFromCD. + public readonly HashSet InstallShieldCABFilePackageIds = new HashSet(); + } +} diff --git a/OpenRA.Game/ModMetadata.cs b/OpenRA.Game/ModMetadata.cs index a3430d319a..72222a6f21 100644 --- a/OpenRA.Game/ModMetadata.cs +++ b/OpenRA.Game/ModMetadata.cs @@ -8,6 +8,7 @@ */ #endregion +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -24,6 +25,7 @@ namespace OpenRA public string Version; public string Author; public bool Hidden; + public ContentInstaller Content; static Dictionary ValidateMods() { @@ -34,19 +36,30 @@ namespace OpenRA var ret = new Dictionary(); foreach (var m in mods) { - var yamlPath = Platform.ResolvePath(".", "mods", m, "mod.yaml"); - if (!File.Exists(yamlPath)) - continue; + try + { + var yamlPath = Platform.ResolvePath(".", "mods", m, "mod.yaml"); + if (!File.Exists(yamlPath)) + continue; - var yaml = new MiniYaml(null, MiniYaml.FromFile(yamlPath)); - var nd = yaml.ToDictionary(); - if (!nd.ContainsKey("Metadata")) - continue; + var yaml = new MiniYaml(null, MiniYaml.FromFile(yamlPath)); + var nd = yaml.ToDictionary(); + if (!nd.ContainsKey("Metadata")) + continue; - var mod = FieldLoader.Load(nd["Metadata"]); - mod.Id = m; + var mod = FieldLoader.Load(nd["Metadata"]); + mod.Id = m; - ret.Add(m, mod); + if (nd.ContainsKey("ContentInstaller")) + mod.Content = FieldLoader.Load(nd["ContentInstaller"]); + + ret.Add(m, mod); + } + catch (Exception ex) + { + Console.WriteLine("An exception occured when trying to load ModMetadata for `{0}`:".F(m)); + Console.WriteLine(ex.Message); + } } return ret; diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index e8de19d10a..30dbdd1844 100644 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -95,6 +95,7 @@ + diff --git a/OpenRA.Mods.Common/InstallUtils.cs b/OpenRA.Mods.Common/InstallUtils.cs index 4520561375..98e471ff0c 100644 --- a/OpenRA.Mods.Common/InstallUtils.cs +++ b/OpenRA.Mods.Common/InstallUtils.cs @@ -18,31 +18,6 @@ using OpenRA.FileSystem; namespace OpenRA.Mods.Common { - public class ContentInstaller : IGlobalModData - { - public readonly string MenuWidget = null; - public readonly string MusicMenuWidget = null; - public readonly string BackgroundWidget = null; - public readonly HashSet TestFiles = new HashSet(); - public readonly HashSet DiskTestFiles = new HashSet(); - public readonly string PackageToExtractFromCD = null; - public readonly bool OverwriteFiles = true; - - public readonly Dictionary CopyFilesFromCD = new Dictionary(); - public readonly Dictionary ExtractFilesFromCD = new Dictionary(); - - public readonly string PackageMirrorList = null; - - public readonly string MusicPackageMirrorList = null; - public readonly int ShippedSoundtracks = 0; - - /// InstallShield .cab File Ids, used to extract Mod specific files. - public readonly HashSet InstallShieldCABFileIds = new HashSet(); - - /// InstallShield .cab File Ids, used to extract Mod specific archives and extract contents of ExtractFilesFromCD. - public readonly HashSet InstallShieldCABFilePackageIds = new HashSet(); - } - public static class InstallUtils { static IEnumerable GetEntries(this ZipInputStream z) @@ -81,7 +56,8 @@ namespace OpenRA.Mods.Common foreach (var file in directory.Value) { - var dest = Path.Combine(destPath, targetDir, file.ToLowerInvariant()); + var containingDir = Path.Combine(destPath, targetDir); + var dest = Path.Combine(containingDir, file.ToLowerInvariant()); if (File.Exists(dest)) { if (overwrite) @@ -93,6 +69,8 @@ namespace OpenRA.Mods.Common } } + Directory.CreateDirectory(containingDir); + using (var sourceStream = GlobalFileSystem.Open(file)) using (var destStream = File.Create(dest)) { @@ -123,13 +101,16 @@ namespace OpenRA.Mods.Common } var destFile = Path.GetFileName(file); - var dest = Path.Combine(destPath, targetDir, destFile.ToLowerInvariant()); + var containingDir = Path.Combine(destPath, targetDir); + var dest = Path.Combine(containingDir, destFile.ToLowerInvariant()); if (File.Exists(dest) && !overwrite) { Log.Write("debug", "Skipping {0}".F(dest)); continue; } + Directory.CreateDirectory(containingDir); + onProgress("Copying " + destFile); Log.Write("debug", "Copy {0} to {1}".F(sourcePath, dest)); File.Copy(sourcePath, dest, true); diff --git a/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs b/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs index f356025ac8..a2c17d1f5f 100644 --- a/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs +++ b/OpenRA.Mods.Common/LoadScreens/BlankLoadScreen.cs @@ -10,6 +10,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using OpenRA.FileFormats; using OpenRA.FileSystem; @@ -40,27 +41,13 @@ namespace OpenRA.Mods.Common.LoadScreens Ui.ResetAll(); Game.Settings.Save(); - // Check whether the mod content is installed - // TODO: The installation code has finally been beaten into shape, so we can - // finally move it all into the planned "Manage Content" panel in the modchooser mod. var installData = Game.ModData.Manifest.Get(); - var installModContent = !installData.TestFiles.All(f => GlobalFileSystem.Exists(f)); - var installModMusic = args != null && args.Contains("Install.Music"); + var isModContentInstalled = installData.TestFiles.All(f => GlobalFileSystem.Exists(Path.GetFileName(f))); - if (installModContent || installModMusic) + // Mod assets are missing! + if (!isModContentInstalled) { - var widgetArgs = new WidgetArgs() - { - { "continueLoading", () => Game.RunAfterTick(() => - Game.InitializeMod(Game.Settings.Game.Mod, args)) }, - }; - - if (installData.BackgroundWidget != null) - Ui.LoadWidget(installData.BackgroundWidget, Ui.Root, widgetArgs); - - var menu = installModContent ? installData.MenuWidget : installData.MusicMenuWidget; - Ui.OpenWindow(menu, widgetArgs); - + Game.InitializeMod("modchooser", new Arguments()); return; } diff --git a/OpenRA.Mods.Common/LoadScreens/ModChooserLoadScreen.cs b/OpenRA.Mods.Common/LoadScreens/ModChooserLoadScreen.cs index 563d9624f0..d744f8ccdc 100644 --- a/OpenRA.Mods.Common/LoadScreens/ModChooserLoadScreen.cs +++ b/OpenRA.Mods.Common/LoadScreens/ModChooserLoadScreen.cs @@ -41,7 +41,17 @@ namespace OpenRA.Mods.Common.LoadScreens public void StartGame(Arguments args) { - Ui.LoadWidget("MODCHOOSER", Ui.Root, new WidgetArgs()); + var widgetArgs = new WidgetArgs(); + + Ui.LoadWidget("MODCHOOSER_BACKGROUND", Ui.Root, widgetArgs); + + if (args != null && args.Contains("installMusic")) + { + widgetArgs.Add("modId", args.GetValue("installMusic", "")); + Ui.OpenWindow("INSTALL_MUSIC_PANEL", widgetArgs); + } + else + Ui.OpenWindow("MODCHOOSER_DIALOG", widgetArgs); } public void Dispose() diff --git a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs index 5e0803cbe5..1a05241fc2 100644 --- a/OpenRA.Mods.Common/Widgets/ButtonWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ButtonWidget.cs @@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Widgets public string Background = "button"; public bool Depressed = false; public int VisualHeight = ChromeMetrics.Get("ButtonDepth"); - public int BaseLine = 0; + public int BaseLine = ChromeMetrics.Get("ButtonBaseLine"); public string Font = ChromeMetrics.Get("ButtonFont"); public Color TextColor = ChromeMetrics.Get("ButtonTextColor"); public Color TextColorDisabled = ChromeMetrics.Get("ButtonTextColorDisabled"); diff --git a/OpenRA.Mods.Common/Widgets/Logic/Installation/DownloadPackagesLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Installation/DownloadPackagesLogic.cs index a79e0da3ef..bbeb55bb29 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Installation/DownloadPackagesLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Installation/DownloadPackagesLogic.cs @@ -9,11 +9,10 @@ #endregion using System; -using System.Collections.Generic; using System.ComponentModel; using System.IO; -using System.Linq; using System.Net; +using System.Text; using OpenRA.Support; using OpenRA.Widgets; @@ -21,24 +20,29 @@ namespace OpenRA.Mods.Common.Widgets.Logic { public class DownloadPackagesLogic { + static readonly string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" }; readonly Widget panel; + readonly string modId; readonly string mirrorListUrl; readonly ProgressBarWidget progressBar; readonly LabelWidget statusLabel; readonly Action afterInstall; string mirror; - static readonly string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" }; [ObjectCreator.UseCtor] - public DownloadPackagesLogic(Widget widget, Action afterInstall, string mirrorListUrl) + public DownloadPackagesLogic(Widget widget, Action afterInstall, string mirrorListUrl, string modId) { this.mirrorListUrl = mirrorListUrl; this.afterInstall = afterInstall; + this.modId = modId; panel = widget.Get("INSTALL_DOWNLOAD_PANEL"); progressBar = panel.Get("PROGRESS_BAR"); statusLabel = panel.Get("STATUS_LABEL"); + var text = "Downloading {0} assets...".F(ModMetadata.AllMods[modId].Title); + panel.Get("TITLE").Text = text; + ShowDownloadDialog(); } @@ -52,9 +56,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic var cancelButton = panel.Get("CANCEL_BUTTON"); - var mirrorsFile = Platform.ResolvePath("^", "Content", Game.ModData.Manifest.Mod.Id, "mirrors.txt"); var file = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - var dest = Platform.ResolvePath("^", "Content", Game.ModData.Manifest.Mod.Id); + var dest = Platform.ResolvePath("^", "Content", modId); Action onDownloadProgress = i => { @@ -100,7 +103,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic onError(Download.FormatErrorMessage(i.Error)); return; } - else if (cancelled) + + if (cancelled) { onError("Download cancelled"); return; @@ -119,7 +123,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic } }; - Action onFetchMirrorsComplete = (i, cancelled) => + Action onFetchMirrorsComplete = (i, cancelled) => { progressBar.Indeterminate = true; @@ -128,21 +132,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic onError(Download.FormatErrorMessage(i.Error)); return; } - else if (cancelled) + + if (cancelled) { onError("Download cancelled"); return; } - var mirrorList = new List(); - using (var r = new StreamReader(mirrorsFile)) - { - string line; - while ((line = r.ReadLine()) != null) - if (!string.IsNullOrEmpty(line)) - mirrorList.Add(line); - } - + var data = Encoding.UTF8.GetString(i.Result); + var mirrorList = data.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); mirror = mirrorList.Random(new MersenneTwister()); // Save the package to a temp file @@ -152,7 +150,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic }; // Get the list of mirrors - var updateMirrors = new Download(mirrorListUrl, mirrorsFile, onDownloadProgress, onFetchMirrorsComplete); + var updateMirrors = new Download(mirrorListUrl, onDownloadProgress, onFetchMirrorsComplete); cancelButton.OnClick = () => { updateMirrors.Cancel(); Ui.CloseWindow(); }; retryButton.OnClick = () => { updateMirrors.Cancel(); ShowDownloadDialog(); }; } diff --git a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs index 6e4ec3f38b..1fcee2378b 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallFromCDLogic.cs @@ -19,19 +19,21 @@ namespace OpenRA.Mods.Common.Widgets.Logic { public class InstallFromCDLogic { + readonly string modId; readonly Widget panel; readonly ProgressBarWidget progressBar; readonly LabelWidget statusLabel; - readonly Action continueLoading; + readonly Action afterInstall; readonly ButtonWidget retryButton, backButton; readonly Widget installingContainer, insertDiskContainer; readonly ContentInstaller installData; [ObjectCreator.UseCtor] - public InstallFromCDLogic(Widget widget, Action continueLoading) + public InstallFromCDLogic(Widget widget, Action afterInstall, string modId) { - installData = Game.ModData.Manifest.Get(); - this.continueLoading = continueLoading; + this.modId = modId; + installData = ModMetadata.AllMods[modId].Content; + this.afterInstall = afterInstall; panel = widget.Get("INSTALL_FROMCD_PANEL"); progressBar = panel.Get("PROGRESS_BAR"); statusLabel = panel.Get("STATUS_LABEL"); @@ -74,6 +76,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic InstallTFD(Platform.ResolvePath(path, "data1.hdr")); else { + var text = "Please insert a {0} install CD and click Retry.".F(ModMetadata.AllMods[modId].Title); + insertDiskContainer.Get("INFO2").Text = text; + insertDiskContainer.IsVisible = () => true; installingContainer.IsVisible = () => false; } @@ -103,13 +108,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var filename = cabExtractor.FileName(index); statusLabel.GetText = () => "Extracting {0}".F(filename); - var dest = Platform.ResolvePath("^", "Content", Game.ModData.Manifest.Mod.Id, filename.ToLowerInvariant()); + var dest = Platform.ResolvePath("^", "Content", modId, filename.ToLowerInvariant()); cabExtractor.ExtractFile(index, dest); progressBar.Percentage += installPercent; } var ArchivesToExtract = installData.InstallShieldCABFilePackageIds.Select(x => x.Split(':')); - var destDir = Platform.ResolvePath("^", "Content", Game.ModData.Manifest.Mod.Id); + var destDir = Platform.ResolvePath("^", "Content", modId); var onError = (Action)(s => { }); var overwrite = installData.OverwriteFiles; @@ -124,7 +129,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var filename = cabExtractor.FileName(uint.Parse(archive[0])); statusLabel.GetText = () => "Extracting {0}".F(filename); - var destFile = Platform.ResolvePath("^", "Content", Game.ModData.Manifest.Mod.Id, filename.ToLowerInvariant()); + var destFile = Platform.ResolvePath("^", "Content", modId, filename.ToLowerInvariant()); cabExtractor.ExtractFile(uint.Parse(archive[0]), destFile); var annotation = archive.Length > 1 ? archive[1] : null; InstallUtils.ExtractFromPackage(source, destFile, annotation, extractFiles, destDir, overwrite, onProgress, onError); @@ -132,7 +137,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic } } - continueLoading(); + afterInstall(); }) { IsBackground = true }.Start(); } @@ -143,7 +148,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic insertDiskContainer.IsVisible = () => false; installingContainer.IsVisible = () => true; - var dest = Platform.ResolvePath("^", "Content", Game.ModData.Manifest.Mod.Id); + var dest = Platform.ResolvePath("^", "Content", modId); var copyFiles = installData.CopyFilesFromCD; var packageToExtract = installData.PackageToExtractFromCD.Split(':'); @@ -193,7 +198,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { statusLabel.GetText = () => "Game assets have been extracted."; Ui.CloseWindow(); - continueLoading(); + afterInstall(); }); } catch (Exception e) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallLogic.cs index 4685a06e9c..59591abd72 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallLogic.cs @@ -8,8 +8,6 @@ */ #endregion -using System; -using System.Collections.Generic; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic @@ -17,31 +15,28 @@ namespace OpenRA.Mods.Common.Widgets.Logic public class InstallLogic : Widget { [ObjectCreator.UseCtor] - public InstallLogic(Widget widget, Action continueLoading) + public InstallLogic(Widget widget, string mirrorListUrl, string modId) { - var installData = Game.ModData.Manifest.Get(); var panel = widget.Get("INSTALL_PANEL"); - var widgetArgs = new WidgetArgs() + var widgetArgs = new WidgetArgs { - { "afterInstall", () => { Ui.CloseWindow(); continueLoading(); } }, - { "continueLoading", continueLoading }, - { "mirrorListUrl", installData.PackageMirrorList }, + { "afterInstall", () => { Game.InitializeMod(modId, new Arguments()); } }, + { "mirrorListUrl", mirrorListUrl }, + { "modId", modId } }; - panel.Get("DOWNLOAD_BUTTON").OnClick = () => - Ui.OpenWindow("INSTALL_DOWNLOAD_PANEL", widgetArgs); + var mod = ModMetadata.AllMods[modId]; + var text = "OpenRA requires the original {0} game content.".F(mod.Title); + panel.Get("DESC1").Text = text; + + var downloadButton = panel.Get("DOWNLOAD_BUTTON"); + downloadButton.OnClick = () => Ui.OpenWindow("INSTALL_DOWNLOAD_PANEL", widgetArgs); + downloadButton.IsDisabled = () => string.IsNullOrEmpty(mod.Content.PackageMirrorList); panel.Get("INSTALL_BUTTON").OnClick = () => Ui.OpenWindow("INSTALL_FROMCD_PANEL", widgetArgs); - panel.Get("BACK_BUTTON").OnClick = () => - { - Game.RunAfterTick(() => - { - Game.Settings.Game.PreviousMod = Game.ModData.Manifest.Mod.Id; - Game.InitializeMod("modchooser", null); - }); - }; + panel.Get("BACK_BUTTON").OnClick = Ui.CloseWindow; } } } diff --git a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallMusicLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallMusicLogic.cs index 7dd7956884..0b1fa7c794 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallMusicLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Installation/InstallMusicLogic.cs @@ -9,10 +9,6 @@ #endregion using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using OpenRA.FileSystem; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic @@ -20,38 +16,41 @@ namespace OpenRA.Mods.Common.Widgets.Logic public class InstallMusicLogic { [ObjectCreator.UseCtor] - public InstallMusicLogic(Widget widget) + public InstallMusicLogic(Widget widget, string modId) { var installMusicContainer = widget.Get("INSTALL_MUSIC_PANEL"); - Action loadDefaultMod = () => Game.RunAfterTick(() => - Game.InitializeMod(Game.Settings.Game.Mod, null)); + Action loadDefaultMod = () => Game.RunAfterTick(() => Game.InitializeMod(modId, null)); - var cancelButton = installMusicContainer.GetOrNull("CANCEL_BUTTON"); + var cancelButton = installMusicContainer.GetOrNull("BACK_BUTTON"); if (cancelButton != null) cancelButton.OnClick = loadDefaultMod; - var copyFromDiscButton = installMusicContainer.GetOrNull("COPY_FROM_CD_BUTTON"); + var copyFromDiscButton = installMusicContainer.GetOrNull("INSTALL_MUSIC_BUTTON"); if (copyFromDiscButton != null) { copyFromDiscButton.OnClick = () => { - Ui.OpenWindow("INSTALL_FROMCD_PANEL", new WidgetArgs() { - { "continueLoading", loadDefaultMod }, + Ui.OpenWindow("INSTALL_FROMCD_PANEL", new WidgetArgs + { + { "afterInstall", loadDefaultMod }, + { "modId", modId } }); }; } - var downloadButton = installMusicContainer.GetOrNull("DOWNLOAD_BUTTON"); + var downloadButton = installMusicContainer.GetOrNull("DOWNLOAD_MUSIC_BUTTON"); if (downloadButton != null) { - var installData = Game.ModData.Manifest.Get(); - downloadButton.IsVisible = () => !string.IsNullOrEmpty(installData.MusicPackageMirrorList); + var installData = ModMetadata.AllMods[modId].Content; + downloadButton.IsDisabled = () => string.IsNullOrEmpty(installData.MusicPackageMirrorList); downloadButton.OnClick = () => { - Ui.OpenWindow("INSTALL_DOWNLOAD_PANEL", new WidgetArgs() { + Ui.OpenWindow("INSTALL_DOWNLOAD_PANEL", new WidgetArgs + { { "afterInstall", loadDefaultMod }, { "mirrorListUrl", installData.MusicPackageMirrorList }, + { "modId", modId } }); }; } diff --git a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs index 7672102c1c..80597047e2 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ModBrowserLogic.cs @@ -14,6 +14,7 @@ using System.Drawing; using System.IO; using System.Linq; using OpenRA.Graphics; +using OpenRA.Primitives; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets.Logic @@ -25,6 +26,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic readonly ModMetadata[] allMods; readonly Dictionary previews = new Dictionary(); readonly Dictionary logos = new Dictionary(); + readonly Cache modInstallStatus; + readonly Widget modChooserPanel; + readonly ButtonWidget loadButton; readonly SheetBuilder sheetBuilder; ModMetadata selectedMod; string selectedAuthor; @@ -34,30 +38,30 @@ namespace OpenRA.Mods.Common.Widgets.Logic [ObjectCreator.UseCtor] public ModBrowserLogic(Widget widget) { - var panel = widget; - var loadButton = panel.Get("LOAD_BUTTON"); + modChooserPanel = widget; + loadButton = modChooserPanel.Get("LOAD_BUTTON"); loadButton.OnClick = () => LoadMod(selectedMod); loadButton.IsDisabled = () => selectedMod.Id == Game.ModData.Manifest.Mod.Id; - panel.Get("QUIT_BUTTON").OnClick = Game.Exit; + modChooserPanel.Get("QUIT_BUTTON").OnClick = Game.Exit; - modList = panel.Get("MOD_LIST"); + modList = modChooserPanel.Get("MOD_LIST"); modTemplate = modList.Get("MOD_TEMPLATE"); - panel.Get("MOD_DESC").GetText = () => selectedDescription; - panel.Get("MOD_TITLE").GetText = () => selectedMod.Title; - panel.Get("MOD_AUTHOR").GetText = () => selectedAuthor; - panel.Get("MOD_VERSION").GetText = () => selectedMod.Version; + modChooserPanel.Get("MOD_DESC").GetText = () => selectedDescription; + modChooserPanel.Get("MOD_TITLE").GetText = () => selectedMod.Title; + modChooserPanel.Get("MOD_AUTHOR").GetText = () => selectedAuthor; + modChooserPanel.Get("MOD_VERSION").GetText = () => selectedMod.Version; - var prevMod = panel.Get("PREV_MOD"); + var prevMod = modChooserPanel.Get("PREV_MOD"); prevMod.OnClick = () => { modOffset -= 1; RebuildModList(); }; prevMod.IsVisible = () => modOffset > 0; - var nextMod = panel.Get("NEXT_MOD"); + var nextMod = modChooserPanel.Get("NEXT_MOD"); nextMod.OnClick = () => { modOffset += 1; RebuildModList(); }; nextMod.IsVisible = () => modOffset + 5 < allMods.Length; - panel.Get("MOD_PREVIEW").GetSprite = () => + modChooserPanel.Get("MOD_PREVIEW").GetSprite = () => { Sprite ret = null; previews.TryGetValue(selectedMod.Id, out ret); @@ -89,9 +93,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic catch (Exception) { } } - ModMetadata initialMod = null; + modInstallStatus = new Cache(IsModInstalled); + + ModMetadata initialMod; ModMetadata.AllMods.TryGetValue(Game.Settings.Game.PreviousMod, out initialMod); - SelectMod(initialMod ?? ModMetadata.AllMods["ra"]); + SelectMod(initialMod != null && initialMod.Id != "modchooser" ? initialMod : ModMetadata.AllMods["ra"]); RebuildModList(); } @@ -113,6 +119,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic break; var mod = allMods[j]; + var item = modTemplate.Clone() as ButtonWidget; item.Bounds = new Rectangle(outerMargin + i * stride, 0, width, height); item.IsHighlighted = () => selectedMod == mod; @@ -148,10 +155,27 @@ namespace OpenRA.Mods.Common.Widgets.Logic var selectedIndex = Array.IndexOf(allMods, mod); if (selectedIndex - modOffset > 4) modOffset = selectedIndex - 4; + + loadButton.Text = modInstallStatus[mod] ? "Load Mod" : "Install Assets"; } void LoadMod(ModMetadata mod) { + if (!modInstallStatus[mod]) + { + var widgetArgs = new WidgetArgs + { + { "continueLoading", () => + Game.RunAfterTick(() => Game.InitializeMod(Game.Settings.Game.Mod, new Arguments())) }, + { "mirrorListUrl", mod.Content.PackageMirrorList }, + { "modId", mod.Id } + }; + + Ui.OpenWindow("INSTALL_PANEL", widgetArgs); + + return; + } + Game.RunAfterTick(() => { Ui.CloseWindow(); @@ -159,5 +183,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic Game.InitializeMod(mod.Id, null); }); } + + static bool IsModInstalled(ModMetadata mod) + { + return mod.Content.TestFiles.All(file => File.Exists(Path.GetFullPath(Platform.ResolvePath(file)))); + } } } diff --git a/OpenRA.Mods.Common/Widgets/Logic/MusicPlayerLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MusicPlayerLogic.cs index 449963aaf6..0279ad9c9a 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MusicPlayerLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MusicPlayerLogic.cs @@ -90,11 +90,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic var installButton = widget.GetOrNull("INSTALL_BUTTON"); if (installButton != null) { - installButton.IsDisabled = () => world == null || world.Type != WorldType.Shellmap; - var args = new string[] { "Install.Music=true" }; + installButton.IsDisabled = () => world.Type != WorldType.Shellmap; + var args = new[] { "installMusic={0}".F(Game.ModData.Manifest.Mod.Id) }; installButton.OnClick = () => - Game.RunAfterTick(() => - Game.InitializeMod(Game.Settings.Game.Mod, new Arguments(args))); + Game.RunAfterTick(() => Game.InitializeMod("modchooser", new Arguments(args))); var installData = Game.ModData.Manifest.Get(); installButton.IsVisible = () => modRules.InstalledMusic.ToArray().Length <= installData.ShippedSoundtracks; diff --git a/OpenRA.Mods.Common/Widgets/ProgressBarWidget.cs b/OpenRA.Mods.Common/Widgets/ProgressBarWidget.cs index dad4f024c5..8c2558b9ac 100644 --- a/OpenRA.Mods.Common/Widgets/ProgressBarWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProgressBarWidget.cs @@ -10,12 +10,17 @@ using System; using System.Drawing; +using OpenRA.Graphics; using OpenRA.Widgets; namespace OpenRA.Mods.Common.Widgets { public class ProgressBarWidget : Widget { + public string Background = "progressbar-bg"; + public string Bar = "progressbar-thumb"; + public Size BarMargin = new Size(2, 2); + public int Percentage = 0; public bool Indeterminate = false; @@ -44,14 +49,16 @@ namespace OpenRA.Mods.Common.Widgets { var rb = RenderBounds; var percentage = GetPercentage(); - WidgetUtils.DrawPanel("progressbar-bg", rb); + WidgetUtils.DrawPanel(Background, rb); - var barRect = wasIndeterminate ? - new Rectangle(rb.X + 2 + (int)(0.75 * offset * (rb.Width - 4)), rb.Y + 2, (rb.Width - 4) / 4, rb.Height - 4) : - new Rectangle(rb.X + 2, rb.Y + 2, percentage * (rb.Width - 4) / 100, rb.Height - 4); + var minBarWidth = (int)(ChromeProvider.GetImage(Bar, "border-l").Size.X + ChromeProvider.GetImage(Bar, "border-r").Size.X); + var maxBarWidth = rb.Width - BarMargin.Width * 2; + var barWidth = wasIndeterminate ? maxBarWidth / 4 : percentage * maxBarWidth / 100; + barWidth = Math.Max(barWidth, minBarWidth); - if (barRect.Width > 0) - WidgetUtils.DrawPanel("progressbar-thumb", barRect); + var barOffset = wasIndeterminate ? (int)(0.75 * offset * maxBarWidth) : 0; + var barRect = new Rectangle(rb.X + BarMargin.Width + barOffset, rb.Y + BarMargin.Height, barWidth, rb.Height - 2 * BarMargin.Height); + WidgetUtils.DrawPanel(Bar, barRect); } bool wasIndeterminate; diff --git a/mods/cnc/chrome.yaml b/mods/cnc/chrome.yaml index aa3a7c67e6..7b910d144a 100644 --- a/mods/cnc/chrome.yaml +++ b/mods/cnc/chrome.yaml @@ -5,7 +5,6 @@ shellmapbits: chrome.png record: 288,16,16,16 logos: chrome.png - install:128,0,128,128 eva:256,64,128,64 nod-load:0,256,256,256 gdi-load:256,256,256,256 diff --git a/mods/cnc/chrome/install.yaml b/mods/cnc/chrome/install.yaml deleted file mode 100644 index f736e70c95..0000000000 --- a/mods/cnc/chrome/install.yaml +++ /dev/null @@ -1,207 +0,0 @@ -Container@INSTALL_BACKGROUND: - Width: WINDOW_RIGHT - Height: WINDOW_BOTTOM - Children: - Image@NOD: - X: WINDOW_RIGHT/2-384 - Y: (WINDOW_BOTTOM-256)/2 - ImageCollection: logos - ImageName: nod-load - Image@GDI: - X: WINDOW_RIGHT/2+128 - Y: (WINDOW_BOTTOM-256)/2 - ImageCollection: logos - ImageName: gdi-load - Image@EVA: - X: WINDOW_RIGHT-128-43 - Y: 43 - Width: 128 - Height: 64 - ImageCollection: logos - ImageName: eva - Background: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Background: shellmapborder - -Container@INSTALL_PANEL: - Logic: InstallLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - 150)/2 - Width: 640 - Height: 150 - Children: - Label@TITLE: - Width: PARENT_RIGHT - Y: 0-25 - Font: BigBold - Contrast: true - Align: Center - Text: Install Required - Background@bg: - Width: 640 - Height: 150 - Background: panel-black - Children: - Image@INSTALL: - X: 11 - Y: 11 - ImageCollection: logos - ImageName: install - Label@INFO: - X: 170 - Y: 50 - Width: PARENT_RIGHT-30 - Height: 25 - Text: OpenRA requires the original Command & Conquer game content. - Font: Bold - Label@INFO2: - X: 170 - Y: 70 - Width: PARENT_RIGHT-185 - Height: 25 - WordWrap: true - Text: Content can be downloaded, or copied from the install CD. - Font: Bold - Button@BACK_BUTTON: - Y: 149 - Width: 140 - Height: 35 - Text: Back - Button@DOWNLOAD_BUTTON: - X: 350 - Y: 149 - Width: 140 - Height: 35 - Text: Download - Button@INSTALL_BUTTON: - X: 500 - Y: 149 - Width: 140 - Height: 35 - Text: Use CD - -Container@INSTALL_FROMCD_PANEL: - Logic: InstallFromCDLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - 150)/2 - Width: 640 - Height: 150 - Children: - Label@TITLE: - Width: PARENT_RIGHT - Y: 0-25 - Font: BigBold - Contrast: true - Align: Center - Text: Installing from CD - Background@bg: - Width: 640 - Height: 150 - Background: panel-black - Children: - Image@INSTALL: - X: 11 - Y: 11 - ImageCollection: logos - ImageName: install - Container@INSTALLING: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Visible: false - Children: - ProgressBar@PROGRESS_BAR: - X: 170 - Y: 45 - Width: PARENT_RIGHT - 185 - Height: 35 - Label@STATUS_LABEL: - X: 170 - Y: 85 - Width: PARENT_RIGHT - 185 - Height: 25 - Align: Left - Container@INSERT_DISK: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Visible: false - Children: - Label@INFO: - X: 170 - Y: 50 - Width: PARENT_RIGHT-30 - Height: 25 - Text: Disk not found. - Font: Bold - Label@INFO2: - X: 170 - Y: 70 - Width: PARENT_RIGHT-185 - Height: 25 - WordWrap: true - Text: Please insert one of the Command & Conquer install CDs then click Retry. - Font: Bold - Button@BACK_BUTTON: - Key: escape - Y: 149 - Width: 140 - Height: 35 - Text: Back - Button@RETRY_BUTTON: - Key: return - X: 500 - Y: 149 - Width: 140 - Height: 35 - Text: Retry - -Container@INSTALL_DOWNLOAD_PANEL: - Logic: DownloadPackagesLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - 150)/2 - Width: 640 - Height: 150 - Children: - Label@TITLE: - Width: PARENT_RIGHT - Y: 0-25 - Font: BigBold - Contrast: true - Align: Center - Text: Downloading Command & Conquer Content - Background@bg: - Width: 640 - Height: 150 - Background: panel-black - Children: - Image@INSTALL: - X: 11 - Y: 11 - ImageCollection: logos - ImageName: install - ProgressBar@PROGRESS_BAR: - X: 170 - Y: 45 - Width: PARENT_RIGHT - 185 - Height: 35 - Label@STATUS_LABEL: - X: 170 - Y: 85 - Width: PARENT_RIGHT - 185 - Height: 25 - Align: Left - Text: Initialising... - Button@CANCEL_BUTTON: - Key: escape - Y: 149 - Width: 140 - Height: 35 - Text: Cancel - Button@RETRY_BUTTON: - Key: return - X: 500 - Y: 149 - Width: 140 - Height: 35 - Text: Retry - diff --git a/mods/cnc/metrics.yaml b/mods/cnc/metrics.yaml index 64dcaa7846..0e682d5684 100644 --- a/mods/cnc/metrics.yaml +++ b/mods/cnc/metrics.yaml @@ -7,6 +7,7 @@ Metrics: ButtonTextColorDisabled: 128,128,128 ButtonTextContrast: false ButtonTextContrastColor: 0,0,0 + ButtonBaseLine: 0 CheckboxPressedState: true HotkeyFont: Regular HotkeyColor: 255,255,255 diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index 5b0a2b4a5b..cfb39841f1 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -90,7 +90,6 @@ Assemblies: ./mods/cnc/OpenRA.Mods.Cnc.dll ChromeLayout: - ./mods/cnc/chrome/install.yaml ./mods/cnc/chrome/mainmenu.yaml ./mods/cnc/chrome/serverbrowser.yaml ./mods/cnc/chrome/createserver.yaml @@ -140,10 +139,7 @@ LoadScreen: CncLoadScreen Text: Loading ContentInstaller: - TestFiles: conquer.mix, desert.mix, sounds.mix, speech.mix, temperat.mix, tempicnh.mix, winter.mix - BackgroundWidget: INSTALL_BACKGROUND - MenuWidget: INSTALL_PANEL - MusicMenuWidget: INSTALL_MUSIC_PANEL + TestFiles: ^Content/cnc/conquer.mix, ^Content/cnc/desert.mix, ^Content/cnc/sounds.mix, ^Content/cnc/speech.mix, ^Content/cnc/temperat.mix, ^Content/cnc/tempicnh.mix, ^Content/cnc/winter.mix FilesToCopy: CONQUER.MIX, DESERT.MIX, SCORES.MIX, SOUNDS.MIX, TEMPERAT.MIX, WINTER.MIX FilesToExtract: speech.mix, tempicnh.mix, transit.mix PackageMirrorList: http://www.openra.net/packages/cnc-mirrors.txt diff --git a/mods/d2k/chrome/install.yaml b/mods/d2k/chrome/install.yaml deleted file mode 100644 index e60d023c9a..0000000000 --- a/mods/d2k/chrome/install.yaml +++ /dev/null @@ -1,160 +0,0 @@ -Background@INSTALL_PANEL: - Logic: InstallLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Install Required - Align: Center - Font: Bold - Label@DESC1: - X: 0 - Y: 50 - Width: PARENT_RIGHT - Height: 25 - Text: OpenRA requires the original Dune 2000 game content. - Align: Center - Label@DESC2: - X: 0 - Y: 70 - Width: PARENT_RIGHT - Height: 25 - Text: Content can be downloaded, or copied from the install CD. - Align: Center - Button@DOWNLOAD_BUTTON: - X: 20 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Download - Font: Bold - Button@INSTALL_BUTTON: - X: 140 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Use CD - Font: Bold - Button@BACK_BUTTON: - X: PARENT_RIGHT - 130 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Back - Font: Bold - -Background@INSTALL_DOWNLOAD_PANEL: - Logic: DownloadPackagesLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Downloading Dune 2000 Content - Align: Center - Font: Bold - ProgressBar@PROGRESS_BAR: - X: 50 - Y: 55 - Width: PARENT_RIGHT - 100 - Height: 25 - Label@STATUS_LABEL: - X: 50 - Y: 80 - Width: PARENT_RIGHT - 100 - Height: 25 - Align: Left - Button@RETRY_BUTTON: - X: PARENT_RIGHT - 280 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Visible: false - Text: Retry - Font: Bold - Key: return - Button@CANCEL_BUTTON: - X: PARENT_RIGHT - 140 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Cancel - Font: Bold - Key: escape - -Background@INSTALL_FROMCD_PANEL: - Logic: InstallFromCDLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Installing from CD - Align: Center - Font: Bold - Container@INSTALLING: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Visible: false - Children: - ProgressBar@PROGRESS_BAR: - X: 50 - Y: 55 - Width: PARENT_RIGHT - 100 - Height: 25 - Label@STATUS_LABEL: - X: 50 - Y: 80 - Width: PARENT_RIGHT - 100 - Height: 25 - Align: Left - Container@INSERT_DISK: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Visible: false - Children: - Label@INFO: - Y: 50 - Width: PARENT_RIGHT - Height: 25 - Text: Disk not found. - Align: Center - Label@INFO2: - Y: 70 - Width: PARENT_RIGHT - Height: 25 - Text: Please insert the Dune 2000 install CD then click Retry. - Align: Center - Button@RETRY_BUTTON: - X: PARENT_RIGHT - 280 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Retry - Font: Bold - Key: return - Button@BACK_BUTTON: - X: PARENT_RIGHT - 140 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Back - Font: Bold - Key: escape - diff --git a/mods/d2k/metrics.yaml b/mods/d2k/metrics.yaml index 895fd06d63..4d0f23b773 100644 --- a/mods/d2k/metrics.yaml +++ b/mods/d2k/metrics.yaml @@ -7,6 +7,7 @@ Metrics: ButtonTextColorDisabled: 128,128,128 ButtonTextContrast: false ButtonTextContrastColor: 0,0,0 + ButtonBaseLine: 0 CheckboxPressedState: false HotkeyFont: Regular HotkeyColor: 255,255,255 diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 729e9a911b..e56af97479 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -16,7 +16,6 @@ Folders: ~^Content/d2k/GAMESFX ~^Content/d2k/Movies ~^Content/d2k/Music - ~^Content/d2k/Tilesets MapFolders: ./mods/d2k/maps: System @@ -65,7 +64,6 @@ Assemblies: ./mods/d2k/OpenRA.Mods.D2k.dll ChromeLayout: - ./mods/d2k/chrome/install.yaml ./mods/d2k/chrome/ingame.yaml ./mods/ra/chrome/ingame-chat.yaml ./mods/ra/chrome/ingame-diplomacy.yaml @@ -124,17 +122,14 @@ LoadScreen: LogoStripeLoadScreen Text: Filling Crates..., Breeding Sandworms..., Fuelling carryalls..., Deploying harvesters..., Preparing 'thopters..., Summoning mentats... ContentInstaller: - MenuWidget: INSTALL_PANEL - MusicMenuWidget: INSTALL_MUSIC_PANEL # TODO: check if DATA.R8 is at 1.03 patch level with 4840 frames - TestFiles: BLOXBASE.R8, BLOXBAT.R8, BLOXBGBS.R8, BLOXICE.R8, BLOXTREE.R8, BLOXWAST.R8, DATA.R8, SOUND.RS + TestFiles: ^Content/d2k/BLOXBASE.R8, ^Content/d2k/BLOXBAT.R8, ^Content/d2k/BLOXBGBS.R8, ^Content/d2k/BLOXICE.R8, ^Content/d2k/BLOXTREE.R8, ^Content/d2k/BLOXWAST.R8, ^Content/d2k/DATA.R8, ^Content/d2k/SOUND.RS PackageMirrorList: http://www.openra.net/packages/d2k-103-mirrors.txt DiskTestFiles: music/ambush.aud, setup/setup.z PackageToExtractFromCD: setup/setup.z OverwriteFiles: False ExtractFilesFromCD: - .: SOUND.RS, DATA.R8, MOUSE.R8 - Tilesets: BLOXBASE.R8, BLOXBAT.R8, BLOXBGBS.R8, BLOXICE.R8, BLOXTREE.R8, BLOXWAST.R8 + .: SOUND.RS, DATA.R8, MOUSE.R8, BLOXBASE.R8, BLOXBAT.R8, BLOXBGBS.R8, BLOXICE.R8, BLOXTREE.R8, BLOXWAST.R8 GAMESFX: A_ECONF1.AUD, A_ECONF2.AUD, A_ECONF3.AUD, A_ESEL1.AUD, A_ESEL2.AUD, A_ESEL3.AUD, A_FCONF1.AUD, A_FCONF2.AUD, A_FCONF3.AUD,A_FCONF4.AUD, A_FSEL1.AUD, A_FSEL2.AUD, A_FSEL3.AUD, A_FSEL4.AUD, AI_1MIN.AUD, AI_2MIN.AUD, AI_3MIN.AUD, AI_4MIN.AUD, AI_5MIN.AUD, AI_ABORT.AUD, AI_ATACK.AUD, AI_BDRDY.AUD, AI_BLOST.AUD, AI_BUILD.AUD, AI_CANCL.AUD, AI_CAPT.AUD, A_ICONF1.AUD, A_ICONF2.AUD, A_ICONF3.AUD, AI_DHRDY.AUD, AI_DPLOY.AUD, AI_ENEMY.AUD, AI_GANEW.AUD, AI_GLOAD.AUD, AI_GSAVE.AUD, AI_GUARD.AUD, AI_HATTK.AUD, AI_HOLD.AUD, AI_LAUNC.AUD, AI_MAP1A.AUD, AI_MAP1B.AUD, AI_MAP1C.AUD, AI_MAP2A.AUD, AI_MAP2B.AUD, AI_MAP2C.AUD, AI_MAP3A.AUD, AI_MAP4A.AUD, AI_MAP5A.AUD, AI_MAP6A.AUD, AI_MAP7A.AUD, AI_MAP8A.AUD, AI_MAP9A.AUD, AI_MEND.AUD, AI_MFAIL.AUD, AI_MONEY.AUD, AI_MWIN.AUD, AI_NEWOP.AUD, AI_NROOM.AUD, AI_ORDER.AUD, AI_PLACE.AUD, AI_POWER.AUD, AI_PREP.AUD, AI_PRMRY.AUD, AI_REINF.AUD, AI_RUN.AUD, A_ISEL1.AUD, A_ISEL2.AUD, A_ISEL3.AUD, AI_SELL.AUD, AI_SILOS.AUD, AI_SPORT.AUD, AI_TRAIN.AUD, AI_ULOST.AUD, AI_UNRDY.AUD, AI_UPGOP.AUD, AI_UPGRD.AUD, AI_WATTK.AUD, AI_WSIGN.AUD, A_VCONF1.AUD, A_VCONF2.AUD, A_VCONF3.AUD, A_VSEL1.AUD, A_VSEL2.AUD, A_VSEL3.AUD, G_SCONF1.AUD, G_SCONF2.AUD, G_SCONF3.AUD, G_SSEL1.AUD, G_SSEL2.AUD, G_SSEL3.AUD, H_ECONF1.AUD, H_ECONF2.AUD, H_ECONF3.AUD, H_ESEL1.AUD, H_ESEL2.AUD, H_ESEL3.AUD, HI_1MIN.AUD, HI_2MIN.AUD, HI_3MIN.AUD, HI_4MIN.AUD, HI_5MIN.AUD, HI_ABORT.AUD, HI_ATACK.AUD, HI_BDRDY.AUD, HI_BLOST.AUD, HI_BUILD.AUD, HI_CANCL.AUD, HI_CAPT.AUD, H_ICONF1.AUD, H_ICONF2.AUD, H_ICONF3.AUD, HI_DHRDY.AUD, HI_DPLOY.AUD, HI_ENEMY.AUD, HI_GANEW.AUD,HI_GLOAD.AUD, HI_GSAVE.AUD, HI_GUARD.AUD, HI_HATTK.AUD, HI_HOLD.AUD, HI_LAUNC.AUD, HI_MAP1A.AUD, HI_MAP1B.AUD, HI_MAP1C.AUD, HI_MAP2A.AUD, HI_MAP2B.AUD, HI_MAP2C.AUD, HI_MAP3A.AUD, HI_MAP3B.AUD, HI_MAP4A.AUD, HI_MAP4B.AUD, HI_MAP5A.AUD, HI_MAP6A.AUD, HI_MAP6B.AUD, HI_MAP7A.AUD, HI_MAP9A.AUD, HI_MAP9.AUD, HI_MEND.AUD, HI_MFAIL.AUD, HI_MONEY.AUD, HI_MWIN.AUD, HI_NEWOP.AUD, HI_NROOM.AUD, HI_ORDER.AUD, HI_PLACE.AUD, HI_POWER.AUD, HI_PREP.AUD, HI_PRMRY.AUD, HI_REINF.AUD, HI_RUN.AUD, H_ISEL1.AUD, H_ISEL2.AUD, H_ISEL3.AUD, HI_SELL.AUD, HI_SILOS.AUD,HI_SPORT.AUD, HI_TRAIN.AUD, HI_ULOST.AUD, HI_UNRDY.AUD, HI_UPGOP.AUD, HI_UPGRD.AUD, HI_WATTK.AUD, HI_WSIGN.AUD, H_VCONF1.AUD, H_VCONF2.AUD, H_VCONF3.AUD, H_VSEL1.AUD, H_VSEL2.AUD, H_VSEL3.AUD, O_ECONF1.AUD, O_ECONF2.AUD, O_ECONF3.AUD, O_ESEL1.AUD, O_ESEL2.AUD, O_ESEL3.AUD, OI_1MIN.AUD, OI_2MIN.AUD, OI_3MIN.AUD, OI_4MIN.AUD, OI_5MIN.AUD, OI_ABORT.AUD, OI_ATACK.AUD, OI_BDRDY.AUD, OI_BLOST.AUD, OI_BUILD.AUD, OI_CANCL.AUD, OI_CAPT.AUD, O_ICONF1.AUD, O_ICONF2.AUD, O_ICONF3.AUD, OI_DHRDY.AUD, OI_DPLOY.AUD, OI_ENEMY.AUD, OI_GANEW.AUD, OI_GLOAD.AUD, OI_GSAVE.AUD, OI_GUARD.AUD, OI_HATTK.AUD, OI_HOLD.AUD, OI_LAUNC.AUD, OI_MAP1A.AUD, OI_MAP1B.AUD, OI_MAP1C.AUD, OI_MAP2A.AUD, OI_MAP2B.AUD, OI_MAP2C.AUD, OI_MAP3A.AUD, OI_MAP4A.AUD, OI_MAP5A.AUD, OI_MAP6A.AUD, OI_MAP7A.AUD, OI_MAP8A.AUD, OI_MAP9A.AUD, OI_MEND.AUD, OI_MFAIL.AUD, OI_MONEY.AUD, OI_MWIN.AUD, OI_NEWOP.AUD, OI_NROOM.AUD, OI_ORDER.AUD, OI_PLACE.AUD, OI_POWER.AUD, OI_PREP.AUD, OI_PRMRY.AUD, OI_REINF.AUD, OI_RUN.AUD, O_ISEL1.AUD, O_ISEL2.AUD, O_ISEL3.AUD, OI_SELL.AUD, OI_SILOS.AUD, OI_SPORT.AUD, OI_TRAIN.AUD, OI_ULOST.AUD, OI_UNRDY.AUD, OI_UPGOP.AUD, OI_UPGRD.AUD, OI_WATTK.AUD, OI_WSIGN.AUD, O_SCONF1.AUD, O_SCONF2.AUD, O_SCONF3.AUD, O_SSEL1.AUD, O_SSEL2.AUD, O_SSEL3.AUD, O_VCONF1.AUD, O_VCONF2.AUD, O_VCONF3.AUD, O_VSEL1.AUD, O_VSEL2.AUD, O_VSEL3.AUD CopyFilesFromCD: Movies: movies/a_br01_e.vqa, movies/a_br02_e.vqa, movies/a_br03_e.vqa, movies/a_br04_e.vqa, movies/a_br05_e.vqa, movies/a_br06_e.vqa, movies/a_br07_e.vqa, movies/a_br08_e.vqa, movies/a_br09_e.vqa, movies/a_finl_e.vqa, movies/a_lose_e.vqa, movies/a_mntg_e.vqa, movies/h_br01_e.vqa, movies/h_br02_e.vqa, movies/h_br03_e.vqa, movies/h_br04_e.vqa, movies/h_br05_e.vqa, movies/h_br06_e.vqa, movies/h_br07_e.vqa, movies/h_br08_e.vqa, movies/h_br09_e.vqa, movies/h_finl_e.vqa, movies/h_lose_e.vqa, movies/h_mntg_e.vqa, movies/o_br01_e.vqa, movies/o_br02_e.vqa, movies/o_br03_e.vqa, movies/o_br04_e.vqa, movies/o_br05_e.vqa, movies/o_br06_e.vqa, movies/o_br07_e.vqa, movies/o_br08_e.vqa, movies/o_br09_e.vqa, movies/o_finl_e.vqa, movies/o_lose_e.vqa, movies/o_mntg_e.vqa, movies/g_int1_e.vqa, movies/g_int2_e.vqa, movies/g_maps_e.vqa, movies/g_pln2_e.vqa, movies/g_plnt_e.vqa, movies/t_titl_e.vqa diff --git a/mods/modchooser/chrome.png b/mods/modchooser/chrome.png index 141af11a4f..662a60a702 100644 Binary files a/mods/modchooser/chrome.png and b/mods/modchooser/chrome.png differ diff --git a/mods/modchooser/chrome.yaml b/mods/modchooser/chrome.yaml index b85b55fc80..632e84ca8a 100644 --- a/mods/modchooser/chrome.yaml +++ b/mods/modchooser/chrome.yaml @@ -124,6 +124,28 @@ button-highlighted-disabled: chrome.png corner-bl: 256,566,10,10 corner-br: 310,566,10,10 +progressbar-bg: chrome.png + background: 453,565,56,6 + border-r: 507,565,5,6 + border-l: 448,565,5,6 + border-b: 453,571,54,5 + border-t: 453,560,54,5 + corner-tl: 448,560,5,5 + corner-tr: 507,560,5,5 + corner-bl: 448,571,5,5 + corner-br: 507,571,5,5 + +progressbar-thumb: chrome.png + background: 453,549,56,6 + border-r: 507,549,5,6 + border-l: 448,549,5,6 + border-b: 453,555,54,5 + border-t: 453,544,54,5 + corner-tl: 448,544,5,5 + corner-tr: 507,544,5,5 + corner-bl: 448,555,5,5 + corner-br: 507,555,5,5 + panel-rule: chrome.png border-t: 64,512,64,2 diff --git a/mods/modchooser/install.yaml b/mods/modchooser/install.yaml new file mode 100644 index 0000000000..7f8d32093d --- /dev/null +++ b/mods/modchooser/install.yaml @@ -0,0 +1,262 @@ +Container@INSTALL_PANEL: + Logic: InstallLogic + X: (WINDOW_RIGHT - WIDTH)/2 + Y: (WINDOW_BOTTOM - HEIGHT)/2 + Width: 500 + Height: 177 + Children: + Background: + Width: PARENT_RIGHT + Height: PARENT_BOTTOM + Background: panel-bg + Background@RULE: + X: 30 + Y: 50 + Width: 440 + Height:150 + Background:panel-rule + Label@TITLE: + X: 0 + Y: 12 + Width: PARENT_RIGHT + Height: 25 + Text: Install Assets + Align: Center + Font: MediumBold + Label@DESC1: + X: 0 + Y: 65 + Width: PARENT_RIGHT + Height: 25 + Align: Center + Label@DESC2: + X: 0 + Y: 85 + Width: PARENT_RIGHT + Height: 25 + Text: Content can be downloaded (if available), or copied from the install CD. + Align: Center + Button@DOWNLOAD_BUTTON: + X: 20 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Download + Font: Bold + Button@INSTALL_BUTTON: + X: 140 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Use CD + Font: Bold + Button@BACK_BUTTON: + X: PARENT_RIGHT - 130 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Back + Font: Bold + Key: escape + +Container@INSTALL_DOWNLOAD_PANEL: + Logic: DownloadPackagesLogic + X: (WINDOW_RIGHT - WIDTH)/2 + Y: (WINDOW_BOTTOM - HEIGHT)/2 + Width: 500 + Height: 177 + Children: + Background: + Width: PARENT_RIGHT + Height: PARENT_BOTTOM + Background: panel-bg + Background@RULE: + X: 30 + Y: 50 + Width: 440 + Height:150 + Background:panel-rule + Label@TITLE: + X: 0 + Y: 12 + Width: PARENT_RIGHT + Height: 25 + Align: Center + Font: MediumBold + ProgressBar@PROGRESS_BAR: + X: 50 + Y: 64 + Width: PARENT_RIGHT - 100 + Height: 16 + BarMargin: 0, 0 + Label@STATUS_LABEL: + X: 36 + Y: 85 + Width: PARENT_RIGHT - 100 + Height: 25 + Align: Left + Button@RETRY_BUTTON: + X: PARENT_RIGHT - 280 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 120 + Height: 32 + Visible: false + Text: Retry + Font: Bold + Key: return + Button@CANCEL_BUTTON: + X: PARENT_RIGHT - 130 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Cancel + Font: Bold + Key: escape + +Container@INSTALL_FROMCD_PANEL: + Logic: InstallFromCDLogic + X: (WINDOW_RIGHT - WIDTH)/2 + Y: (WINDOW_BOTTOM - HEIGHT)/2 + Width: 500 + Height: 177 + Children: + Background: + Width: PARENT_RIGHT + Height: PARENT_BOTTOM + Background: panel-bg + Background@RULE: + X: 30 + Y: 50 + Width: 440 + Height:150 + Background:panel-rule + Label@TITLE: + X: 0 + Y: 12 + Width: PARENT_RIGHT + Height: 25 + Text: Fetching assets from CD... + Align: Center + Font: MediumBold + Container@INSTALLING: + Width: PARENT_RIGHT + Height: PARENT_BOTTOM + Visible: false + Children: + ProgressBar@PROGRESS_BAR: + X: 50 + Y: 60 + Width: PARENT_RIGHT - 100 + Height: 16 + BarMargin: 0, 0 + Label@STATUS_LABEL: + X: 36 + Y: 80 + Width: PARENT_RIGHT - 100 + Height: 25 + Align: Left + Container@INSERT_DISK: + Width: PARENT_RIGHT + Height: PARENT_BOTTOM + Visible: false + Children: + Label@INFO1: + Y: 65 + Width: PARENT_RIGHT + Height: 25 + Text: Disk not found. + Align: Center + Label@INFO2: + Y: 85 + Width: PARENT_RIGHT + Height: 25 + Align: Center + Button@RETRY_BUTTON: + X: 20 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Retry + Font: Bold + Key: return + Button@BACK_BUTTON: + X: PARENT_RIGHT - 130 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Back + Font: Bold + Key: escape + + +Container@INSTALL_MUSIC_PANEL: + Logic: InstallMusicLogic + X: (WINDOW_RIGHT - WIDTH)/2 + Y: (WINDOW_BOTTOM - HEIGHT)/2 + Width: 500 + Height: 177 + Children: + Background: + Width: PARENT_RIGHT + Height: PARENT_BOTTOM + Background: panel-bg + Background@RULE: + X: 30 + Y: 50 + Width: 440 + Height:150 + Background:panel-rule + Label@TITLE: + X: 0 + Y: 12 + Width: PARENT_RIGHT + Height: 25 + Text: Install Music + Align: Center + Font: MediumBold + Label@DESC1: + X: 0 + Y: 65 + Width: PARENT_RIGHT + Height: 25 + Text: OpenRA can download the music files from the internet (if available), + Align: Center + Label@DESC2: + X: 0 + Y: 85 + Width: PARENT_RIGHT + Height: 25 + Text: or you can install them from an original CD. + Align: Center + Button@DOWNLOAD_MUSIC_BUTTON: + X: 20 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Download + Font: Bold + Button@INSTALL_MUSIC_BUTTON: + X: 140 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Use CD + Font: Bold + Button@BACK_BUTTON: + X: PARENT_RIGHT - 130 + Y: PARENT_BOTTOM - 52 + Background:button-highlighted + Width: 110 + Height: 32 + Text: Back + Font: Bold + Key: escape diff --git a/mods/modchooser/metrics.yaml b/mods/modchooser/metrics.yaml index a4f6800caa..f51d8102df 100644 --- a/mods/modchooser/metrics.yaml +++ b/mods/modchooser/metrics.yaml @@ -3,10 +3,12 @@ Metrics: ButtonDepth: 0 ButtonFont: Bold + ButtonBaseLine: 1 ButtonTextColor: 255,255,255 ButtonTextColorDisabled: 128,128,128 ButtonTextContrast: false ButtonTextContrastColor: 0,0,0 + ButtonBaseLine: 2 CheckboxPressedState: true HotkeyFont: Regular HotkeyColor: 255,255,255 diff --git a/mods/modchooser/mod.yaml b/mods/modchooser/mod.yaml index 1811c45686..4b6d50e8bd 100644 --- a/mods/modchooser/mod.yaml +++ b/mods/modchooser/mod.yaml @@ -8,7 +8,6 @@ Folders: . ./mods/modchooser - Cursors: ./mods/modchooser/cursors.yaml @@ -20,6 +19,7 @@ Assemblies: ChromeLayout: ./mods/modchooser/modchooser.yaml + ./mods/modchooser/install.yaml Notifications: ./mods/modchooser/notifications.yaml diff --git a/mods/modchooser/modchooser.yaml b/mods/modchooser/modchooser.yaml index e42672deab..a4d83bc54e 100644 --- a/mods/modchooser/modchooser.yaml +++ b/mods/modchooser/modchooser.yaml @@ -1,8 +1,10 @@ -Background@MODCHOOSER: - Logic:ModBrowserLogic +Background@MODCHOOSER_BACKGROUND: Background: background Width:WINDOW_RIGHT Height:WINDOW_BOTTOM + +Background@MODCHOOSER_DIALOG: + Logic:ModBrowserLogic Children: Container: X:(WINDOW_RIGHT - WIDTH)/2 @@ -10,7 +12,7 @@ Background@MODCHOOSER: Width:750 Height:550-4-32 Children: - Background@bg: + Background@DIALOG_BACKGROUND: Y:69 Width:PARENT_RIGHT Height:PARENT_BOTTOM - 69 @@ -123,16 +125,16 @@ Background@MODCHOOSER: X:PARENT_RIGHT - 53 - WIDTH - 170 Y:PARENT_BOTTOM - 25 - HEIGHT Width:140 - Height:35 + Height:32 Text:Load Mod Button@QUIT_BUTTON: Background:button-highlighted X:PARENT_RIGHT - 53 - WIDTH Y:PARENT_BOTTOM - 25 - HEIGHT Width:140 - Height:35 + Height:32 Text:Quit - Background@header: + Background@DIALOG_HEADER: Width:PARENT_RIGHT Height:72 Background:panel-header diff --git a/mods/ra/chrome/install.yaml b/mods/ra/chrome/install.yaml deleted file mode 100644 index db695c4e6c..0000000000 --- a/mods/ra/chrome/install.yaml +++ /dev/null @@ -1,160 +0,0 @@ -Background@INSTALL_PANEL: - Logic: InstallLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Install Required - Align: Center - Font: Bold - Label@DESC1: - X: 0 - Y: 50 - Width: PARENT_RIGHT - Height: 25 - Text: OpenRA requires the original Red Alert game content. - Align: Center - Label@DESC2: - X: 0 - Y: 70 - Width: PARENT_RIGHT - Height: 25 - Text: Content can be downloaded, or copied from the install CD. - Align: Center - Button@DOWNLOAD_BUTTON: - X: 20 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Download - Font: Bold - Button@INSTALL_BUTTON: - X: 140 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Use CD - Font: Bold - Button@BACK_BUTTON: - X: PARENT_RIGHT - 130 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Back - Font: Bold - -Background@INSTALL_DOWNLOAD_PANEL: - Logic: DownloadPackagesLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Downloading Red Alert Content - Align: Center - Font: Bold - ProgressBar@PROGRESS_BAR: - X: 50 - Y: 55 - Width: PARENT_RIGHT - 100 - Height: 25 - Label@STATUS_LABEL: - X: 50 - Y: 80 - Width: PARENT_RIGHT - 100 - Height: 25 - Align: Left - Button@RETRY_BUTTON: - X: PARENT_RIGHT - 280 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Visible: false - Text: Retry - Font: Bold - Key: return - Button@CANCEL_BUTTON: - X: PARENT_RIGHT - 140 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Cancel - Font: Bold - Key: escape - -Background@INSTALL_FROMCD_PANEL: - Logic: InstallFromCDLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Installing from CD - Align: Center - Font: Bold - Container@INSTALLING: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Visible: false - Children: - ProgressBar@PROGRESS_BAR: - X: 50 - Y: 55 - Width: PARENT_RIGHT - 100 - Height: 25 - Label@STATUS_LABEL: - X: 50 - Y: 80 - Width: PARENT_RIGHT - 100 - Height: 25 - Align: Left - Container@INSERT_DISK: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Visible: false - Children: - Label@INFO: - Y: 50 - Width: PARENT_RIGHT - Height: 25 - Text: Disk not found. - Align: Center - Label@INFO2: - Y: 70 - Width: PARENT_RIGHT - Height: 25 - Text: Please insert one of the Red Alert install CDs then click Retry. - Align: Center - Button@RETRY_BUTTON: - X: PARENT_RIGHT - 280 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Retry - Font: Bold - Key: return - Button@BACK_BUTTON: - X: PARENT_RIGHT - 140 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Back - Font: Bold - Key: escape - diff --git a/mods/ra/metrics.yaml b/mods/ra/metrics.yaml index cf1c961e82..00e3fbb107 100644 --- a/mods/ra/metrics.yaml +++ b/mods/ra/metrics.yaml @@ -7,6 +7,7 @@ Metrics: ButtonTextColorDisabled: 128,128,128 ButtonTextContrast: false ButtonTextContrastColor: 0,0,0 + ButtonBaseLine: 0 CheckboxPressedState: false HotkeyFont: Regular HotkeyColor: 255,255,255 diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 0c387cb8cc..d3b8970280 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -77,7 +77,6 @@ Assemblies: ./mods/cnc/OpenRA.Mods.Cnc.dll ChromeLayout: - ./mods/ra/chrome/install.yaml ./mods/ra/chrome/ingame.yaml ./mods/ra/chrome/ingame-chat.yaml ./mods/ra/chrome/ingame-diplomacy.yaml @@ -141,9 +140,7 @@ LoadScreen: LogoStripeLoadScreen Text: Filling Crates..., Charging Capacitors..., Reticulating Splines..., Planting Trees..., Building Bridges..., Aging Empires..., Compiling EVA..., Constructing Pylons..., Activating Skynet..., Splitting Atoms... ContentInstaller: - MenuWidget: INSTALL_PANEL - MusicMenuWidget: INSTALL_MUSIC_PANEL - TestFiles: allies.mix, conquer.mix, interior.mix, redalert.mix, russian.mix, snow.mix, sounds.mix, temperat.mix + TestFiles: ^Content/ra/allies.mix, ^Content/ra/conquer.mix, ^Content/ra/interior.mix, ^Content/ra/redalert.mix, ^Content/ra/russian.mix, ^Content/ra/snow.mix, ^Content/ra/sounds.mix, ^Content/ra/temperat.mix PackageMirrorList: http://www.openra.net/packages/ra-mirrors.txt DiskTestFiles: MAIN.MIX, INSTALL/REDALERT.MIX PackageToExtractFromCD: MAIN.MIX diff --git a/mods/ts/chrome/install.yaml b/mods/ts/chrome/install.yaml deleted file mode 100644 index dd7fa244bd..0000000000 --- a/mods/ts/chrome/install.yaml +++ /dev/null @@ -1,160 +0,0 @@ -Background@INSTALL_PANEL: - Logic: InstallLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Install Required - Align: Center - Font: Bold - Label@DESC1: - X: 0 - Y: 50 - Width: PARENT_RIGHT - Height: 25 - Text: OpenRA requires the original Tiberian Sun game content. - Align: Center - Label@DESC2: - X: 0 - Y: 70 - Width: PARENT_RIGHT - Height: 25 - Text: Content can be downloaded, or copied from the install CD. - Align: Center - Button@DOWNLOAD_BUTTON: - X: 20 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Download - Font: Bold - Button@INSTALL_BUTTON: - X: 140 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Use CD - Font: Bold - Button@BACK_BUTTON: - X: PARENT_RIGHT - 130 - Y: PARENT_BOTTOM - 45 - Width: 110 - Height: 25 - Text: Back - Font: Bold - -Background@INSTALL_DOWNLOAD_PANEL: - Logic: DownloadPackagesLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Downloading Tiberian Sun Content - Align: Center - Font: Bold - ProgressBar@PROGRESS_BAR: - X: 50 - Y: 55 - Width: PARENT_RIGHT - 100 - Height: 25 - Label@STATUS_LABEL: - X: 50 - Y: 80 - Width: PARENT_RIGHT - 100 - Height: 25 - Align: Left - Button@RETRY_BUTTON: - X: PARENT_RIGHT - 280 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Visible: false - Text: Retry - Font: Bold - Key: return - Button@CANCEL_BUTTON: - X: PARENT_RIGHT - 140 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Cancel - Font: Bold - Key: escape - -Background@INSTALL_FROMCD_PANEL: - Logic: InstallFromCDLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 500 - Height: 160 - Children: - Label@TITLE: - X: 0 - Y: 20 - Width: PARENT_RIGHT - Height: 25 - Text: Installing from CD - Align: Center - Font: Bold - Container@INSTALLING: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Visible: false - Children: - ProgressBar@PROGRESS_BAR: - X: 50 - Y: 55 - Width: PARENT_RIGHT - 100 - Height: 25 - Label@STATUS_LABEL: - X: 50 - Y: 80 - Width: PARENT_RIGHT - 100 - Height: 25 - Align: Left - Container@INSERT_DISK: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Visible: false - Children: - Label@INFO: - Y: 50 - Width: PARENT_RIGHT - Height: 25 - Text: Disk not found. - Align: Center - Label@INFO2: - Y: 70 - Width: PARENT_RIGHT - Height: 25 - Text: Please insert one of the Tiberian Sun install CDs then click Retry. - Align: Center - Button@RETRY_BUTTON: - X: PARENT_RIGHT - 280 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Retry - Font: Bold - Key: return - Button@BACK_BUTTON: - X: PARENT_RIGHT - 140 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Back - Font: Bold - Key: escape - diff --git a/mods/ts/metrics.yaml b/mods/ts/metrics.yaml index c079cfcac9..e8939a7ad4 100644 --- a/mods/ts/metrics.yaml +++ b/mods/ts/metrics.yaml @@ -7,6 +7,7 @@ Metrics: ButtonTextColorDisabled: 128,128,128 ButtonTextContrast: false ButtonTextContrastColor: 0,0,0 + ButtonBaseLine: 0 CheckboxPressedState: false HotkeyFont: Regular HotkeyColor: 255,255,255 diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index ecc3631dff..413592aa8a 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -131,7 +131,6 @@ Assemblies: ./mods/ts/OpenRA.Mods.TS.dll ChromeLayout: - ./mods/ts/chrome/install.yaml ./mods/ra/chrome/ingame.yaml ./mods/ra/chrome/ingame-chat.yaml ./mods/ra/chrome/ingame-diplomacy.yaml @@ -189,9 +188,7 @@ LoadScreen: LogoStripeLoadScreen Text: Updating EVA installation..., Changing perspective... ContentInstaller: - MenuWidget: INSTALL_PANEL - MusicMenuWidget: INSTALL_MUSIC_PANEL - TestFiles: cache.mix, conquer.mix, isosnow.mix, isotemp.mix, local.mix, sidec01.mix, sidec02.mix, sno.mix, snow.mix, sounds.mix, speech01.mix, tem.mix, temperat.mix + TestFiles: ^Content/ts/cache.mix, ^Content/ts/conquer.mix, ^Content/ts/isosnow.mix, ^Content/ts/isotemp.mix, ^Content/ts/local.mix, ^Content/ts/sidec01.mix, ^Content/ts/sidec02.mix, ^Content/ts/sno.mix, ^Content/ts/snow.mix, ^Content/ts/sounds.mix, ^Content/ts/speech01.mix, ^Content/ts/tem.mix, ^Content/ts/temperat.mix PackageMirrorList: http://www.openra.net/packages/ts-mirrors.txt DiskTestFiles: MULTI.MIX, INSTALL/TIBSUN.MIX CopyFilesFromCD: