mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Reformat buttons.
This commit is contained in:
parent
b64a9a51f8
commit
bff99da585
1 changed files with 9 additions and 7 deletions
|
|
@ -243,8 +243,10 @@ public partial class ConfigWindow
|
||||||
var buttonWidth1 = new Vector2( 90 * ImGuiHelpers.GlobalScale, 0 );
|
var buttonWidth1 = new Vector2( 90 * ImGuiHelpers.GlobalScale, 0 );
|
||||||
var buttonWidth2 = new Vector2( 120 * ImGuiHelpers.GlobalScale, 0 );
|
var buttonWidth2 = new Vector2( 120 * ImGuiHelpers.GlobalScale, 0 );
|
||||||
|
|
||||||
var change = DrawNewCurrentPlayerCollection();
|
var assignWidth = new Vector2((_window._inputTextWidth.X - ImGui.GetStyle().ItemSpacing.X) / 2, 0);
|
||||||
change |= DrawNewTargetCollection();
|
var change = DrawNewCurrentPlayerCollection(assignWidth);
|
||||||
|
ImGui.SameLine();
|
||||||
|
change |= DrawNewTargetCollection(assignWidth);
|
||||||
|
|
||||||
change |= DrawNewPlayerCollection( buttonWidth1, width );
|
change |= DrawNewPlayerCollection( buttonWidth1, width );
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
@ -261,7 +263,7 @@ public partial class ConfigWindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool DrawNewCurrentPlayerCollection()
|
private static bool DrawNewCurrentPlayerCollection(Vector2 width)
|
||||||
{
|
{
|
||||||
var player = Penumbra.Actors.GetCurrentPlayer();
|
var player = Penumbra.Actors.GetCurrentPlayer();
|
||||||
var result = Penumbra.CollectionManager.Individuals.CanAdd( player );
|
var result = Penumbra.CollectionManager.Individuals.CanAdd( player );
|
||||||
|
|
@ -273,7 +275,8 @@ public partial class ConfigWindow
|
||||||
_ => string.Empty,
|
_ => string.Empty,
|
||||||
};
|
};
|
||||||
|
|
||||||
if( ImGuiUtil.DrawDisabledButton( "Assign Currently Played Character", _window._inputTextWidth, tt, result != IndividualCollections.AddResult.Valid ) )
|
|
||||||
|
if( ImGuiUtil.DrawDisabledButton( "Assign Current Player", width, tt, result != IndividualCollections.AddResult.Valid ) )
|
||||||
{
|
{
|
||||||
Penumbra.CollectionManager.Individuals.Add( new[] { player }, Penumbra.CollectionManager.Default );
|
Penumbra.CollectionManager.Individuals.Add( new[] { player }, Penumbra.CollectionManager.Default );
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -282,7 +285,7 @@ public partial class ConfigWindow
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool DrawNewTargetCollection()
|
private static bool DrawNewTargetCollection(Vector2 width)
|
||||||
{
|
{
|
||||||
var target = Dalamud.Targets.Target;
|
var target = Dalamud.Targets.Target;
|
||||||
var player = Penumbra.Actors.FromObject( target, false, true );
|
var player = Penumbra.Actors.FromObject( target, false, true );
|
||||||
|
|
@ -294,8 +297,7 @@ public partial class ConfigWindow
|
||||||
IndividualCollections.AddResult.Invalid => "No valid character in target detected.",
|
IndividualCollections.AddResult.Invalid => "No valid character in target detected.",
|
||||||
_ => string.Empty,
|
_ => string.Empty,
|
||||||
};
|
};
|
||||||
|
if( ImGuiUtil.DrawDisabledButton( "Assign Current Target", width, tt, result != IndividualCollections.AddResult.Valid ) )
|
||||||
if( ImGuiUtil.DrawDisabledButton( "Assign Current Target", _window._inputTextWidth, tt, result != IndividualCollections.AddResult.Valid ) )
|
|
||||||
{
|
{
|
||||||
Penumbra.CollectionManager.Individuals.Add( new[] { player }, Penumbra.CollectionManager.Default );
|
Penumbra.CollectionManager.Individuals.Add( new[] { player }, Penumbra.CollectionManager.Default );
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue