-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2319 from Nexus-Mods/load-order-styling
Load Order Styling - Part 3
- Loading branch information
Showing
13 changed files
with
257 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 14 additions & 7 deletions
21
src/NexusMods.App.UI/Pages/Sorting/SortingSelection/SortingSelectionDesignViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
using System.Collections.ObjectModel; | ||
using NexusMods.Abstractions.UI; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using NexusMods.Abstractions.Settings; | ||
|
||
namespace NexusMods.App.UI.Pages.Sorting; | ||
|
||
public class SortingSelectionDesignViewModel : AViewModel<ISortingSelectionViewModel>, ISortingSelectionViewModel | ||
{ | ||
private readonly ISettingsManager _settingsManager; | ||
public ReadOnlyObservableCollection<ILoadOrderViewModel> LoadOrderViewModels { get; } | ||
|
||
public SortingSelectionDesignViewModel() | ||
public SortingSelectionDesignViewModel(IServiceProvider serviceProvider) | ||
{ | ||
_settingsManager = serviceProvider.GetRequiredService<ISettingsManager>(); | ||
|
||
var loadOrderViewModels = new ObservableCollection<ILoadOrderViewModel> | ||
{ | ||
new LoadOrderDesignViewModel { SortOrderName = "Load order (RedMOD)", | ||
new LoadOrderDesignViewModel(_settingsManager) | ||
{ | ||
SortOrderName = "Load order (RedMOD)", | ||
InfoAlertHeading = "Load Order for REDmod files in Cyberpunk 2077 - First Loaded Wins", | ||
InfoAlertMessage = "Some Cyberpunk 2077 mods use REDmod files to alter core gameplay elements. If two REDmod files modify the same part of the game, the one loaded first will take priority and overwrite changes from those loaded later.\n\nFor example, the 1st position overwrites the 2nd, the 2nd overwrites the 3rd, and so on." | ||
InfoAlertMessage = | ||
"Some Cyberpunk 2077 mods use REDmod files to alter core gameplay elements. If two REDmod files modify the same part of the game, the one loaded first will take priority and overwrite changes from those loaded later.\n\nFor example, the 1st position overwrites the 2nd, the 2nd overwrites the 3rd, and so on." | ||
}, | ||
new LoadOrderDesignViewModel { SortOrderName = "Load Order (Archive XL)" }, | ||
new LoadOrderDesignViewModel { SortOrderName = "File Overwrites" } | ||
new LoadOrderDesignViewModel(_settingsManager) { SortOrderName = "Load Order (Archive XL)" }, | ||
new LoadOrderDesignViewModel(_settingsManager) { SortOrderName = "File Overwrites" } | ||
}; | ||
|
||
LoadOrderViewModels = new ReadOnlyObservableCollection<ILoadOrderViewModel>(loadOrderViewModels); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.