Add a button to split a mod into separate mods for all options.

This commit is contained in:
Ottermandias 2021-09-04 01:31:40 +02:00
parent 8a355e3905
commit ff17620d85
2 changed files with 119 additions and 0 deletions

View file

@ -480,6 +480,22 @@ namespace Penumbra.UI
}
}
private void DrawSplitButton()
{
if( ImGui.Button( "Split Mod" ) )
{
ModCleanup.SplitMod( Mod!.Data );
}
if( ImGui.IsItemHovered() )
{
ImGui.SetTooltip(
"Split off all options of a mod into single mods that are placed in a collective folder.\n"
+ "Does not remove or change the mod itself, just create (potentially inefficient) copies.\n"
+ "Experimental - Use at own risk!" );
}
}
private void DrawEditLine()
{
DrawOpenModFolderButton();
@ -495,6 +511,8 @@ namespace Penumbra.UI
DrawDeduplicateButton();
ImGui.SameLine();
DrawNormalizeButton();
ImGui.SameLine();
DrawSplitButton();
DrawSortOrder( Mod!.Data, _modManager, _selector );
}