diff --git a/Penumbra/Mods/Subclasses/ModSettings.cs b/Penumbra/Mods/Subclasses/ModSettings.cs index 6d6f2f3d..b79f1c9e 100644 --- a/Penumbra/Mods/Subclasses/ModSettings.cs +++ b/Penumbra/Mods/Subclasses/ModSettings.cs @@ -70,7 +70,7 @@ public class ModSettings var config = Settings[ groupIdx ]; Settings[ groupIdx ] = group.Type switch { - SelectType.Single => config >= optionIdx ? Math.Max( 0, config - 1 ) : config, + SelectType.Single => config >= optionIdx ? (config > 1 ? config - 1 : 0) : config, SelectType.Multi => RemoveBit( config, optionIdx ), _ => config, }; diff --git a/Penumbra/UI/ConfigWindow.Changelog.cs b/Penumbra/UI/ConfigWindow.Changelog.cs index fecc41b7..db6cfec4 100644 --- a/Penumbra/UI/ConfigWindow.Changelog.cs +++ b/Penumbra/UI/ConfigWindow.Changelog.cs @@ -26,12 +26,21 @@ public partial class ConfigWindow .RegisterEntry( "Files in the UI category will no longer be deduplicated for the moment." ) .RegisterHighlight( "If you experience UI-related crashes, please re-import your UI mods.", 1 ) .RegisterEntry( "This is a temporary fix against those not-yet fully understood crashes and may be reworked later.", 1 ) - .RegisterEntry( "On import, Penumbra will now show files with extensions '.ttmp', '.ttmp2' and '.pmp'. You can still select showing generic archive files." ) - .RegisterEntry( "Penumbra Mod Pack ('.pmp') files are meant to be renames of any of the archive types that could already be imported that contain the necessary Penumbra meta files.", 1 ) - .RegisterHighlight( "If you distribute any mod as an archive specifically for Penumbra, you should change its extension to '.pmp'. Supported base archive types are ZIP, 7-Zip and RAR." , 1 ) + .RegisterEntry( + "On import, Penumbra will now show files with extensions '.ttmp', '.ttmp2' and '.pmp'. You can still select showing generic archive files." ) + .RegisterEntry( + "Penumbra Mod Pack ('.pmp') files are meant to be renames of any of the archive types that could already be imported that contain the necessary Penumbra meta files.", + 1 ) + .RegisterHighlight( + "If you distribute any mod as an archive specifically for Penumbra, you should change its extension to '.pmp'. Supported base archive types are ZIP, 7-Zip and RAR.", + 1 ) .RegisterEntry( "Penumbra will now save mod backups with the file extension '.pmp'. They still are regular ZIP files.", 1 ) - .RegisterEntry( "Existing backups in your current mod directory should be automatically renamed. If you manage multiple mod directories, you may need to migrate the other ones manually.", 1 ) + .RegisterEntry( + "Existing backups in your current mod directory should be automatically renamed. If you manage multiple mod directories, you may need to migrate the other ones manually.", + 1 ) .RegisterEntry( "Fixed assigned collections not working correctly on adventurer plates." ) .RegisterEntry( "Fixed a wrongly displayed folder line in some circumstances." ) + .RegisterEntry( "Fixed crash after deleting mod options." ) + .RegisterEntry( "Made identically named options selectable in mod configuration. Do not name your options identically." ) .RegisterEntry( "Added some additional functionality for Mare Synchronos." ); } \ No newline at end of file diff --git a/Penumbra/UI/ConfigWindow.ModPanel.Settings.cs b/Penumbra/UI/ConfigWindow.ModPanel.Settings.cs index 8fc57460..a1eda296 100644 --- a/Penumbra/UI/ConfigWindow.ModPanel.Settings.cs +++ b/Penumbra/UI/ConfigWindow.ModPanel.Settings.cs @@ -168,10 +168,13 @@ public partial class ConfigWindow { for( var idx2 = 0; idx2 < group.Count; ++idx2 ) { + id.Push( idx2 ); if( ImGui.Selectable( group[ idx2 ].Name, idx2 == selectedOption ) ) { Penumbra.CollectionManager.Current.SetModSetting( _mod.Index, groupIdx, ( uint )idx2 ); } + + id.Pop(); } } @@ -201,6 +204,7 @@ public partial class ConfigWindow Widget.BeginFramedGroup( group.Name, group.Description ); for( var idx2 = 0; idx2 < group.Count; ++idx2 ) { + id.Push( idx2 ); var flag = 1u << idx2; var setting = ( flags & flag ) != 0; if( ImGui.Checkbox( group[ idx2 ].Name, ref setting ) ) @@ -208,6 +212,8 @@ public partial class ConfigWindow flags = setting ? flags | flag : flags & ~flag; Penumbra.CollectionManager.Current.SetModSetting( _mod.Index, groupIdx, flags ); } + + id.Pop(); } Widget.EndFramedGroup();