mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Fix assign current player and assign current target buttons not triggering events.
This commit is contained in:
parent
45075d5b27
commit
6ee6e4a4ba
2 changed files with 6 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit a5f5fd3e84be2f829c0e7f779fde1ed34ece3042
|
||||
Subproject commit 5ec8eba3277872682b027796fb7e6d534330571e
|
||||
|
|
@ -278,7 +278,7 @@ public partial class ConfigWindow
|
|||
|
||||
if( ImGuiUtil.DrawDisabledButton( "Assign Current Player", width, tt, result != IndividualCollections.AddResult.Valid ) )
|
||||
{
|
||||
Penumbra.CollectionManager.Individuals.Add( new[] { player }, Penumbra.CollectionManager.Default );
|
||||
Penumbra.CollectionManager.CreateIndividualCollection( player );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -287,19 +287,18 @@ public partial class ConfigWindow
|
|||
|
||||
private static bool DrawNewTargetCollection( Vector2 width )
|
||||
{
|
||||
var target = Dalamud.Targets.Target;
|
||||
var player = Penumbra.Actors.FromObject( target, false, true, true );
|
||||
var result = Penumbra.CollectionManager.Individuals.CanAdd( player );
|
||||
var target = Penumbra.Actors.FromObject( Dalamud.Targets.Target, false, true, true );
|
||||
var result = Penumbra.CollectionManager.Individuals.CanAdd( target );
|
||||
var tt = result switch
|
||||
{
|
||||
IndividualCollections.AddResult.Valid => $"Assign a collection to {player}.",
|
||||
IndividualCollections.AddResult.Valid => $"Assign a collection to {target}.",
|
||||
IndividualCollections.AddResult.AlreadySet => AlreadyAssigned,
|
||||
IndividualCollections.AddResult.Invalid => "No valid character in target detected.",
|
||||
_ => string.Empty,
|
||||
};
|
||||
if( ImGuiUtil.DrawDisabledButton( "Assign Current Target", width, tt, result != IndividualCollections.AddResult.Valid ) )
|
||||
{
|
||||
Penumbra.CollectionManager.Individuals.Add( Penumbra.CollectionManager.Individuals.GetGroup( player ), Penumbra.CollectionManager.Default );
|
||||
Penumbra.CollectionManager.CreateIndividualCollection( Penumbra.CollectionManager.Individuals.GetGroup( target ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue