Add warning if the currently edited collection is not in use anywhere.

This commit is contained in:
Ottermandias 2022-06-17 16:18:56 +02:00
parent abd1fd14f5
commit 61680f0afb
4 changed files with 24 additions and 17 deletions

View file

@ -63,6 +63,10 @@ public partial class ConfigWindow
DrawInheritedCollectionButton( 3 * buttonSize );
ImGui.SameLine();
DrawCollectionSelector( "##collectionSelector", 2 * buttonSize.X, ModCollection.Type.Current, false, null );
if( !Penumbra.CollectionManager.CurrentCollectionInUse )
{
ImGuiUtil.DrawTextButton( "The currently selected collection is not used in any way.", -Vector2.UnitX, Colors.PressEnterWarningBg );
}
}
private static void DrawDefaultCollectionButton( Vector2 width )
@ -112,7 +116,7 @@ public partial class ConfigWindow
// The basic setup for the mod panel.
// Details are in other files.
private partial class ModPanel
private partial class ModPanel : IDisposable
{
private readonly ConfigWindow _window;
@ -123,6 +127,11 @@ public partial class ConfigWindow
public ModPanel( ConfigWindow window )
=> _window = window;
public void Dispose()
{
_nameFont.Dispose();
}
public void Draw( ModFileSystemSelector selector )
{
Init( selector );