diff --git a/Penumbra/Importer/TexToolsImport.cs b/Penumbra/Importer/TexToolsImport.cs index 0dcdceed..f0fff468 100644 --- a/Penumbra/Importer/TexToolsImport.cs +++ b/Penumbra/Importer/TexToolsImport.cs @@ -21,7 +21,7 @@ namespace Penumbra.Importer public ImporterState State { get; private set; } - public long TotalProgress { get; private set; } = 0; + public long TotalProgress { get; private set; } public long CurrentProgress { get; private set; } public float Progress @@ -249,7 +249,7 @@ namespace Penumbra.Importer private static void AddMeta( DirectoryInfo baseFolder, DirectoryInfo groupFolder, ModGroup group, ModMeta meta ) { - var inf = new InstallerInfo + var inf = new OptionGroup { SelectionType = group.SelectionType, GroupName = group.GroupName!, diff --git a/Penumbra/Models/Deduplicator.cs b/Penumbra/Models/Deduplicator.cs index 9c157637..1f10a471 100644 --- a/Penumbra/Models/Deduplicator.cs +++ b/Penumbra/Models/Deduplicator.cs @@ -115,7 +115,7 @@ namespace Penumbra.Models const string duplicates = "Duplicates"; if( !_mod.Groups.ContainsKey( duplicates ) ) { - InstallerInfo info = new() + OptionGroup info = new() { GroupName = duplicates, SelectionType = SelectType.Single, diff --git a/Penumbra/Models/GroupInformation.cs b/Penumbra/Models/GroupInformation.cs index cee5ed5f..200779e3 100644 --- a/Penumbra/Models/GroupInformation.cs +++ b/Penumbra/Models/GroupInformation.cs @@ -29,7 +29,7 @@ namespace Penumbra.Models } } - public struct InstallerInfo + public struct OptionGroup { public string GroupName; diff --git a/Penumbra/Models/ModMeta.cs b/Penumbra/Models/ModMeta.cs index 81441abf..306b1ce5 100644 --- a/Penumbra/Models/ModMeta.cs +++ b/Penumbra/Models/ModMeta.cs @@ -21,7 +21,7 @@ namespace Penumbra.Models public Dictionary< string, string > FileSwaps { get; } = new(); - public Dictionary< string, InstallerInfo > Groups { get; set; } = new(); + public Dictionary< string, OptionGroup > Groups { get; set; } = new(); [JsonIgnore] public bool HasGroupWithConfig { get; set; } = false; diff --git a/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledDetails.cs b/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledDetails.cs index d2492e06..82f7a8cf 100644 --- a/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledDetails.cs +++ b/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledDetails.cs @@ -55,7 +55,7 @@ namespace Penumbra.UI private bool _editMode = false; private int _selectedGroupIndex = 0; - private InstallerInfo? _selectedGroup = null; + private OptionGroup? _selectedGroup = null; private int _selectedOptionIndex = 0; private Option? _selectedOption = null; private (string label, string name)[]? _changedItemsList = null; @@ -99,7 +99,7 @@ namespace Penumbra.UI if( _selectedGroup?.Options.Count > 0 ) { - _selectedOption = ( ( InstallerInfo )_selectedGroup ).Options[ _selectedOptionIndex ]; + _selectedOption = ( ( OptionGroup )_selectedGroup ).Options[ _selectedOptionIndex ]; } else { @@ -545,7 +545,7 @@ namespace Penumbra.UI } } - private void DrawMultiSelectorCheckBox( InstallerInfo group, int idx, int flag, string label ) + private void DrawMultiSelectorCheckBox( OptionGroup group, int idx, int flag, string label ) { var opt = group.Options[ idx ]; var enabled = ( flag & ( 1 << idx ) ) != 0; @@ -557,7 +557,7 @@ namespace Penumbra.UI } } - private void DrawMultiSelector( InstallerInfo group ) + private void DrawMultiSelector( OptionGroup group ) { if( group.Options.Count == 0 ) { @@ -574,7 +574,7 @@ namespace Penumbra.UI ImGuiCustom.EndFramedGroup(); } - private void DrawSingleSelector( InstallerInfo group ) + private void DrawSingleSelector( OptionGroup group ) { if( group.Options.Count < 2 ) { diff --git a/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledDetailsEdit.cs b/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledDetailsEdit.cs index 565a345e..af3aedbf 100644 --- a/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledDetailsEdit.cs +++ b/Penumbra/UI/MenuTabs/TabInstalled/TabInstalledDetailsEdit.cs @@ -63,7 +63,7 @@ namespace Penumbra.UI return false; } - var group = ( InstallerInfo )_selectedGroup!; + var group = ( OptionGroup )_selectedGroup!; if( ImGui.Combo( LabelOptionSelect, ref _selectedOptionIndex, group.Options.Select( O => O.OptionName ).ToArray(), group.Options.Count ) ) { @@ -103,7 +103,7 @@ namespace Penumbra.UI } } - private bool DrawMultiSelectorEditBegin( InstallerInfo group ) + private bool DrawMultiSelectorEditBegin( OptionGroup group ) { var groupName = group.GroupName; if( ImGuiCustom.BeginFramedGroupEdit( ref groupName ) @@ -114,7 +114,7 @@ namespace Penumbra.UI Mod.Conf.Remove( group.GroupName ); if( groupName.Length > 0 ) { - Meta.Groups[ groupName ] = new InstallerInfo() + Meta.Groups[ groupName ] = new OptionGroup() { GroupName = groupName, SelectionType = SelectType.Multi, Options = group.Options }; Mod.Conf[ groupName ] = oldConf; } @@ -125,7 +125,7 @@ namespace Penumbra.UI return false; } - private void DrawMultiSelectorEditAdd( InstallerInfo group, float nameBoxStart ) + private void DrawMultiSelectorEditAdd( OptionGroup group, float nameBoxStart ) { var newOption = ""; ImGui.SetCursorPosX( nameBoxStart ); @@ -139,7 +139,7 @@ namespace Penumbra.UI } } - private void DrawMultiSelectorEdit( InstallerInfo group ) + private void DrawMultiSelectorEdit( OptionGroup group ) { var nameBoxStart = CheckMarkSize; var flag = Mod!.Conf[ group.GroupName ]; @@ -190,7 +190,7 @@ namespace Penumbra.UI ImGuiCustom.EndFramedGroup(); } - private bool DrawSingleSelectorEditGroup( InstallerInfo group ) + private bool DrawSingleSelectorEditGroup( OptionGroup group ) { var groupName = group.GroupName; if( ImGui.InputText( $"##{groupName}_add", ref groupName, 64, ImGuiInputTextFlags.EnterReturnsTrue ) @@ -206,7 +206,7 @@ namespace Penumbra.UI if( groupName.Length > 0 ) { Meta.Groups.Add( groupName, - new InstallerInfo() { GroupName = groupName, Options = group.Options, SelectionType = SelectType.Single } ); + new OptionGroup() { GroupName = groupName, Options = group.Options, SelectionType = SelectType.Single } ); Mod.Conf[ groupName ] = oldConf; } @@ -216,7 +216,7 @@ namespace Penumbra.UI return false; } - private float DrawSingleSelectorEdit( InstallerInfo group ) + private float DrawSingleSelectorEdit( OptionGroup group ) { var code = Mod!.Conf[ group.GroupName ]; var selectionChanged = false; @@ -288,7 +288,7 @@ namespace Penumbra.UI return; } - Meta.Groups[ newGroup ] = new InstallerInfo() + Meta.Groups[ newGroup ] = new OptionGroup() { GroupName = newGroup, SelectionType = selectType,