Skip to content

Commit b9bf791

Browse files
Display missing mods
1 parent 18c6a31 commit b9bf791

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Source/HedgeModManager.UI/Languages/en-AU.axaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
<system:String x:Key="Modal.Title.Information" >Information</system:String>
141141
<system:String x:Key="Modal.Title.InstallError" >Install Error</system:String>
142142
<system:String x:Key="Modal.Title.LoadError" >Load Error</system:String>
143+
<system:String x:Key="Modal.Title.MissingDependency" >Missing Dependencies</system:String>
143144
<system:String x:Key="Modal.Title.SaveError" >Save Error</system:String>
144145
<system:String x:Key="Modal.Title.SelectMods" >Select Mods Directory...</system:String>
145146
<system:String x:Key="Modal.Title.SelectModsFailed" >Invalid Mods Directory</system:String>
@@ -158,6 +159,7 @@
158159
<system:String xml:space="preserve" x:Key="Modal.Message.GameNoAccess">Hedge Mod Manager does not have write&#x0a;access to the game files.&#x0a;&#x0a;Please make sure the game files are writable.</system:String>
159160
<system:String xml:space="preserve" x:Key="Modal.Message.GamescopeError">Mod configuration has been saved.&#x0a;&#x0a;Hedge Mod Manager currently cannot launch games while in Gaming Mode.&#x0a;&#x0a;Please exit Hedge Mod Manager then launch the game.</system:String>
160161
<system:String xml:space="preserve" x:Key="Modal.Message.InstallError">Failed to install mod. Check log for exception.</system:String>
162+
<system:String xml:space="preserve" x:Key="Modal.Message.MissingDependency">The mods listed below are missing and are required to play.&#x0a;&#x0a;{0}</system:String>
161163
<system:String xml:space="preserve" x:Key="Modal.Message.ModLoaderInstallError">An error occurred while trying to install the mod loader.&#x0a;&#x0a;Check log for exception.</system:String>
162164
<system:String xml:space="preserve" x:Key="Modal.Message.PkgUpdate">Please update Hedge Mod Manager using your system's package manager.</system:String>
163165
<system:String xml:space="preserve" x:Key="Modal.Message.SelectModsError">Hedge Mod Manager does not have permissions to the selected directory.&#x0a;&#x0a;Please select another directory.</system:String>

Source/HedgeModManager.UI/ViewModels/MainWindowViewModel.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -561,14 +561,11 @@ public void CheckAndInstallModDependencies()
561561
foreach (var dependency in missing)
562562
Logger.Debug($" {dependency.Title}");
563563

564-
// TODO: Show what mods is missing
565-
var messageBox = new MessageBoxModal("Modal.Title.InstallDependencies", Localize("Modal.Message.InstallDependencies"));
566-
messageBox.AddButton("Common.Button.Cancel", (s, e) => messageBox.Close());
567-
messageBox.AddButton("Common.Button.Install", (s, e) =>
568-
{
569-
Logger.Debug("Install clicked for dependency install");
570-
messageBox.Close();
571-
});
564+
// TODO: Automate installation of missing dependencies
565+
string modListStr = string.Join(Environment.NewLine, missing.Select(x => $"- {x.Title} | {x.Version}")); ;
566+
567+
var messageBox = new MessageBoxModal("Modal.Title.MissingDependency", Localize("Modal.Message.MissingDependency", modListStr));
568+
messageBox.AddButton("Common.Button.OK", (s, e) => messageBox.Close());
572569
messageBox.Open(this);
573570
}
574571
}

0 commit comments

Comments
 (0)