Fixes, IPC
* Armature manager now assigns permanent ActorIdentifier to armatures * Slight changes to make sure penumbra redraw doesn't break temporary profiles * Profile selection UI now gets updated on login/logout in order to display correct colors * Changed logic of setting Armature.IsVisible * Implemented OnProfileUpdate IPC
This commit is contained in:
@@ -25,6 +25,7 @@ public class ProfileFileSystemSelector : FileSystemSelector<Profile, ProfileStat
|
||||
private readonly ProfileManager _profileManager;
|
||||
private readonly ProfileChanged _event;
|
||||
private readonly GameObjectService _gameObjectService;
|
||||
private readonly IClientState _clientState;
|
||||
|
||||
private Profile? _cloneProfile;
|
||||
private string _newName = string.Empty;
|
||||
@@ -51,16 +52,21 @@ public class ProfileFileSystemSelector : FileSystemSelector<Profile, ProfileStat
|
||||
PluginConfiguration configuration,
|
||||
ProfileManager profileManager,
|
||||
ProfileChanged @event,
|
||||
GameObjectService gameObjectService)
|
||||
GameObjectService gameObjectService,
|
||||
IClientState clientState)
|
||||
: base(fileSystem, keyState, logger, allowMultipleSelection: true)
|
||||
{
|
||||
_configuration = configuration;
|
||||
_profileManager = profileManager;
|
||||
_event = @event;
|
||||
_gameObjectService = gameObjectService;
|
||||
_clientState = clientState;
|
||||
|
||||
_event.Subscribe(OnProfileChange, ProfileChanged.Priority.ProfileFileSystemSelector);
|
||||
|
||||
_clientState.Login += OnLoginLogout;
|
||||
_clientState.Logout += OnLoginLogout;
|
||||
|
||||
AddButton(NewButton, 0);
|
||||
AddButton(CloneButton, 20);
|
||||
AddButton(DeleteButton, 1000);
|
||||
@@ -71,6 +77,8 @@ public class ProfileFileSystemSelector : FileSystemSelector<Profile, ProfileStat
|
||||
{
|
||||
base.Dispose();
|
||||
_event.Unsubscribe(OnProfileChange);
|
||||
_clientState.Login -= OnLoginLogout;
|
||||
_clientState.Logout -= OnLoginLogout;
|
||||
}
|
||||
|
||||
protected override uint ExpandedFolderColor
|
||||
@@ -131,6 +139,11 @@ public class ProfileFileSystemSelector : FileSystemSelector<Profile, ProfileStat
|
||||
}
|
||||
}
|
||||
|
||||
private void OnLoginLogout()
|
||||
{
|
||||
SetFilterDirty();
|
||||
}
|
||||
|
||||
private void NewButton(Vector2 size)
|
||||
{
|
||||
if (!ImGuiUtil.DrawDisabledButton(FontAwesomeIcon.Plus.ToIconString(), size, "Create a new profile with default configuration.", false,
|
||||
|
||||
Reference in New Issue
Block a user