mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix begin/end child and window.
This commit is contained in:
parent
52108d6198
commit
8a355e3905
4 changed files with 19 additions and 29 deletions
|
|
@ -26,10 +26,10 @@ namespace Penumbra.UI
|
|||
| ImGuiWindowFlags.NoResize
|
||||
| ImGuiWindowFlags.NoSavedSettings;
|
||||
|
||||
private readonly SettingsInterface _base;
|
||||
private readonly SettingsInterface _base;
|
||||
|
||||
public ManageModsButton( SettingsInterface ui )
|
||||
=> _base = ui;
|
||||
=> _base = ui;
|
||||
|
||||
public void Draw()
|
||||
{
|
||||
|
|
@ -43,12 +43,8 @@ namespace Penumbra.UI
|
|||
|
||||
ImGui.SetNextWindowPos( ss - WindowPosOffset, ImGuiCond.Always );
|
||||
|
||||
if( !ImGui.Begin( MenuButtonsName, ButtonFlags ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( ImGui.Button( MenuButtonLabel, WindowSize ) )
|
||||
if( ImGui.Begin( MenuButtonsName, ButtonFlags )
|
||||
&& ImGui.Button( MenuButtonLabel, WindowSize ) )
|
||||
{
|
||||
_base.FlipVisibility();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@ namespace Penumbra.UI
|
|||
{
|
||||
if( !ImGui.BeginChild( "##CollectionChild", AutoFillSize, true ) )
|
||||
{
|
||||
ImGui.EndChild();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -285,7 +286,6 @@ namespace Penumbra.UI
|
|||
}
|
||||
|
||||
DrawNewCharacterCollection();
|
||||
|
||||
ImGui.EndChild();
|
||||
}
|
||||
|
||||
|
|
@ -296,21 +296,18 @@ namespace Penumbra.UI
|
|||
return;
|
||||
}
|
||||
|
||||
if( !ImGui.BeginChild( "##CollectionHandling", new Vector2( -1, ImGui.GetTextLineHeightWithSpacing() * 6 ), true ) )
|
||||
if( ImGui.BeginChild( "##CollectionHandling", new Vector2( -1, ImGui.GetTextLineHeightWithSpacing() * 6 ), true ) )
|
||||
{
|
||||
ImGui.EndTabItem();
|
||||
return;
|
||||
DrawCurrentCollectionSelector( true );
|
||||
|
||||
ImGui.Dummy( new Vector2( 0, 10 ) );
|
||||
DrawNewCollectionInput();
|
||||
}
|
||||
|
||||
DrawCurrentCollectionSelector( true );
|
||||
|
||||
ImGui.Dummy( new Vector2( 0, 10 ) );
|
||||
DrawNewCollectionInput();
|
||||
ImGui.EndChild();
|
||||
|
||||
DrawCharacterCollectionSelectors();
|
||||
|
||||
|
||||
ImGui.EndTabItem();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -504,12 +504,8 @@ namespace Penumbra.UI
|
|||
try
|
||||
{
|
||||
var ret = ImGui.BeginChild( LabelModPanel, AutoFillSize, true );
|
||||
if( !ret )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( Mod == null )
|
||||
if( !ret || Mod == null )
|
||||
{
|
||||
ImGui.EndChild();
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -764,15 +764,16 @@ namespace Penumbra.UI
|
|||
ImGui.PushStyleVar( ImGuiStyleVar.ItemSpacing, Vector2.Zero );
|
||||
ImGui.BeginGroup();
|
||||
// Inlay selector list
|
||||
ImGui.BeginChild( LabelSelectorList,
|
||||
if( ImGui.BeginChild( LabelSelectorList,
|
||||
new Vector2( SelectorPanelWidth * _selectorScalingFactor, -ImGui.GetFrameHeightWithSpacing() ),
|
||||
true, ImGuiWindowFlags.HorizontalScrollbar );
|
||||
true, ImGuiWindowFlags.HorizontalScrollbar ) )
|
||||
{
|
||||
ImGui.PushStyleVar( ImGuiStyleVar.IndentSpacing, 12.5f );
|
||||
|
||||
ImGui.PushStyleVar( ImGuiStyleVar.IndentSpacing, 12.5f );
|
||||
|
||||
var modIndex = 0;
|
||||
DrawFolderContent( _modManager.StructuredMods, ref modIndex );
|
||||
ImGui.PopStyleVar();
|
||||
var modIndex = 0;
|
||||
DrawFolderContent( _modManager.StructuredMods, ref modIndex );
|
||||
ImGui.PopStyleVar();
|
||||
}
|
||||
|
||||
ImGui.EndChild();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue