Reorder collections tab.

This commit is contained in:
Ottermandias 2022-06-12 15:15:03 +02:00
parent 46c5d52a92
commit 1f46b4951e
2 changed files with 31 additions and 37 deletions

@ -1 +1 @@
Subproject commit 0bd85ed72057b1941579d20a6f622cc2cd9c58ac Subproject commit f48a4eccc654ec1ab1b72aa23324bdce13615f97

View file

@ -27,8 +27,8 @@ public partial class ConfigWindow
return; return;
} }
DrawMainSelectors();
DrawCharacterCollectionSelectors(); DrawCharacterCollectionSelectors();
DrawMainSelectors();
} }
@ -139,14 +139,12 @@ public partial class ConfigWindow
private void DrawCharacterCollectionSelectors() private void DrawCharacterCollectionSelectors()
{ {
using var child = ImRaii.Child( "##Collections", -Vector2.One, true ); ImGui.Dummy( _window._defaultSpace );
if( !child ) if( ImGui.CollapsingHeader( "Active Collections", ImGuiTreeNodeFlags.DefaultOpen ) )
{ {
return; ImGui.Dummy( _window._defaultSpace );
}
DrawDefaultCollectionSelector(); DrawDefaultCollectionSelector();
ImGui.Dummy( _window._defaultSpace );
foreach( var name in Penumbra.CollectionManager.Characters.Keys.OrderBy( k => k ).ToArray() ) foreach( var name in Penumbra.CollectionManager.Characters.Keys.OrderBy( k => k ).ToArray() )
{ {
using var id = ImRaii.PushId( name ); using var id = ImRaii.PushId( name );
@ -165,21 +163,16 @@ public partial class ConfigWindow
} }
DrawNewCharacterCollection(); DrawNewCharacterCollection();
ImGui.NewLine();
}
} }
private void DrawMainSelectors() private void DrawMainSelectors()
{ {
var size = new Vector2( -1, ImGui.Dummy( _window._defaultSpace );
ImGui.GetTextLineHeightWithSpacing() * (InheritedCollectionHeight + 1) if( ImGui.CollapsingHeader( "Collection Settings", ImGuiTreeNodeFlags.DefaultOpen ) )
+ _window._defaultSpace.Y * 2
+ ImGui.GetFrameHeightWithSpacing() * 4
+ ImGui.GetStyle().ItemSpacing.Y * 6 );
using var main = ImRaii.Child( "##CollectionsMain", size, true );
if( !main )
{ {
return; ImGui.Dummy( _window._defaultSpace );
}
DrawCurrentCollectionSelector(); DrawCurrentCollectionSelector();
ImGui.Dummy( _window._defaultSpace ); ImGui.Dummy( _window._defaultSpace );
DrawNewCollectionInput(); DrawNewCollectionInput();
@ -187,4 +180,5 @@ public partial class ConfigWindow
DrawInheritanceBlock(); DrawInheritanceBlock();
} }
} }
}
} }