Actor resolving fixes for UI actors
Profiles should now properly apply to UI actors in Crystalline Conflict and other places Added ability to control which parts of the UI profiles are applying to
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using Dalamud.Game.ClientState.Objects.Enums;
|
using Dalamud.Game.ClientState.Objects.Enums;
|
||||||
using Penumbra.GameData.Actors;
|
using Penumbra.GameData.Actors;
|
||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
|
using Penumbra.GameData.Interop;
|
||||||
using PenumbraExtensions = Penumbra.GameData.Actors.ActorIdentifierExtensions;
|
using PenumbraExtensions = Penumbra.GameData.Actors.ActorIdentifierExtensions;
|
||||||
|
|
||||||
namespace CustomizePlus.GameData.Extensions;
|
namespace CustomizePlus.GameData.Extensions;
|
||||||
@@ -80,48 +81,4 @@ public static class ActorIdentifierExtensions
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Get "true" actor for special actors. Returns ActorIdentifier.Invalid for non-special actors or if actor cannot be found.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="identifier"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
/// <exception cref="Exception"></exception>
|
|
||||||
public static ActorIdentifier GetTrueActorForSpecialType(this ActorIdentifier identifier)
|
|
||||||
{
|
|
||||||
if (!identifier.IsValid)
|
|
||||||
return ActorIdentifier.Invalid;
|
|
||||||
|
|
||||||
if (identifier.Type != IdentifierType.Special)
|
|
||||||
return ActorIdentifier.Invalid;
|
|
||||||
|
|
||||||
if (PenumbraExtensions.Manager == null)
|
|
||||||
throw new Exception("ActorIdentifier.Manager is not initialized");
|
|
||||||
|
|
||||||
switch (identifier.Special)
|
|
||||||
{
|
|
||||||
case ScreenActor.GPosePlayer:
|
|
||||||
case ScreenActor.CharacterScreen:
|
|
||||||
case ScreenActor.FittingRoom:
|
|
||||||
case ScreenActor.DyePreview:
|
|
||||||
case ScreenActor.Portrait:
|
|
||||||
return PenumbraExtensions.Manager.GetCurrentPlayer();
|
|
||||||
case ScreenActor.ExamineScreen:
|
|
||||||
var examineIdentifier = PenumbraExtensions.Manager.GetInspectPlayer();
|
|
||||||
|
|
||||||
if (!examineIdentifier.IsValid)
|
|
||||||
examineIdentifier = PenumbraExtensions.Manager.GetGlamourPlayer(); //returns ActorIdentifier.Invalid if player is invalid
|
|
||||||
|
|
||||||
if (!examineIdentifier.IsValid)
|
|
||||||
return ActorIdentifier.Invalid;
|
|
||||||
|
|
||||||
return examineIdentifier;
|
|
||||||
case ScreenActor.Card6:
|
|
||||||
case ScreenActor.Card7:
|
|
||||||
case ScreenActor.Card8:
|
|
||||||
return PenumbraExtensions.Manager.GetCardPlayer();
|
|
||||||
}
|
|
||||||
|
|
||||||
return ActorIdentifier.Invalid;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,15 @@ public unsafe sealed class ArmatureManager : IDisposable
|
|||||||
ApplyRootTranslation(armature, actor);
|
ApplyRootTranslation(armature, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Force profile rebind for all armatures
|
||||||
|
/// </summary>
|
||||||
|
public void RebindAllArmatures()
|
||||||
|
{
|
||||||
|
foreach (var kvPair in Armatures)
|
||||||
|
kvPair.Value.IsPendingProfileRebind = true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes armatures which no longer have actor associated with them and creates armatures for new actors
|
/// Deletes armatures which no longer have actor associated with them and creates armatures for new actors
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -542,9 +551,7 @@ public unsafe sealed class ArmatureManager : IDisposable
|
|||||||
{
|
{
|
||||||
foreach(var kvPair in Armatures)
|
foreach(var kvPair in Armatures)
|
||||||
{
|
{
|
||||||
var actorIdentifier = kvPair.Key;
|
(var actorIdentifier, _) = _gameObjectService.GetTrueActorForSpecialTypeActor(kvPair.Key);
|
||||||
if (actorIdentifier.Type == IdentifierType.Special)
|
|
||||||
actorIdentifier = actorIdentifier.GetTrueActorForSpecialType();
|
|
||||||
|
|
||||||
if(actorIdentifier.ToNameWithoutOwnerName() == characterName)
|
if(actorIdentifier.ToNameWithoutOwnerName() == characterName)
|
||||||
yield return kvPair.Value;
|
yield return kvPair.Value;
|
||||||
|
|||||||
@@ -86,6 +86,17 @@ public class PluginConfiguration : IPluginConfiguration, ISavable
|
|||||||
|
|
||||||
public CommandSettingsEntries CommandSettings { get; set; } = new();
|
public CommandSettingsEntries CommandSettings { get; set; } = new();
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class ProfileApplicationSettingsEntries
|
||||||
|
{
|
||||||
|
public bool ApplyInCharacterWindow { get; set; } = true;
|
||||||
|
public bool ApplyInTryOn { get; set; } = true;
|
||||||
|
public bool ApplyInCards { get; set; } = true;
|
||||||
|
public bool ApplyInInspect { get; set; } = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProfileApplicationSettingsEntries ProfileApplicationSettings { get; set; } = new();
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
private readonly SaveService _saveService;
|
private readonly SaveService _saveService;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ using Penumbra.GameData.Enums;
|
|||||||
using Penumbra.GameData.Interop;
|
using Penumbra.GameData.Interop;
|
||||||
using ObjectManager = CustomizePlus.GameData.Services.ObjectManager;
|
using ObjectManager = CustomizePlus.GameData.Services.ObjectManager;
|
||||||
using DalamudGameObject = Dalamud.Game.ClientState.Objects.Types.GameObject;
|
using DalamudGameObject = Dalamud.Game.ClientState.Objects.Types.GameObject;
|
||||||
|
using ECommons.Configuration;
|
||||||
|
using System;
|
||||||
|
using CustomizePlus.Configuration.Data;
|
||||||
|
|
||||||
namespace CustomizePlus.Game.Services;
|
namespace CustomizePlus.Game.Services;
|
||||||
|
|
||||||
@@ -15,12 +18,18 @@ public class GameObjectService
|
|||||||
private readonly ActorManager _actorManager;
|
private readonly ActorManager _actorManager;
|
||||||
private readonly IObjectTable _objectTable;
|
private readonly IObjectTable _objectTable;
|
||||||
private readonly ObjectManager _objectManager;
|
private readonly ObjectManager _objectManager;
|
||||||
|
private readonly PluginConfiguration _configuration;
|
||||||
|
|
||||||
public GameObjectService(ActorManager actorManager, IObjectTable objectTable, ObjectManager objectManager)
|
public GameObjectService(
|
||||||
|
ActorManager actorManager,
|
||||||
|
IObjectTable objectTable,
|
||||||
|
ObjectManager objectManager,
|
||||||
|
PluginConfiguration configuration)
|
||||||
{
|
{
|
||||||
_actorManager = actorManager;
|
_actorManager = actorManager;
|
||||||
_objectTable = objectTable;
|
_objectTable = objectTable;
|
||||||
_objectManager = objectManager;
|
_objectManager = objectManager;
|
||||||
|
_configuration = configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetCurrentPlayerName()
|
public string GetCurrentPlayerName()
|
||||||
@@ -54,8 +63,7 @@ public class GameObjectService
|
|||||||
{
|
{
|
||||||
var identifier = kvPair.Key;
|
var identifier = kvPair.Key;
|
||||||
|
|
||||||
if (kvPair.Key.Type == IdentifierType.Special)
|
(identifier, _) = GetTrueActorForSpecialTypeActor(identifier);
|
||||||
identifier = identifier.GetTrueActorForSpecialType();
|
|
||||||
|
|
||||||
if (!identifier.IsValid)
|
if (!identifier.IsValid)
|
||||||
continue;
|
continue;
|
||||||
@@ -80,4 +88,70 @@ public class GameObjectService
|
|||||||
{
|
{
|
||||||
return _objectTable.CreateObjectReference(actor);
|
return _objectTable.CreateObjectReference(actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get "true" actor for special actors.
|
||||||
|
/// This should be used everywhere where resolving proper actor is crucial for proper profile application
|
||||||
|
/// as identifiers returned by object manager with type "Special" need special handling.
|
||||||
|
/// </summary>
|
||||||
|
public (ActorIdentifier, SpecialResult) GetTrueActorForSpecialTypeActor(ActorIdentifier identifier)
|
||||||
|
{
|
||||||
|
if (identifier.Type != IdentifierType.Special)
|
||||||
|
return (identifier, SpecialResult.Invalid);
|
||||||
|
|
||||||
|
if (_actorManager.ResolvePartyBannerPlayer(identifier.Special, out var id))
|
||||||
|
return _configuration.ProfileApplicationSettings.ApplyInCards ? (id, SpecialResult.PartyBanner) : (identifier, SpecialResult.Invalid);
|
||||||
|
|
||||||
|
if (_actorManager.ResolvePvPBannerPlayer(identifier.Special, out id))
|
||||||
|
return _configuration.ProfileApplicationSettings.ApplyInCards ? (id, SpecialResult.PvPBanner) : (identifier, SpecialResult.Invalid);
|
||||||
|
|
||||||
|
if (_actorManager.ResolveMahjongPlayer(identifier.Special, out id))
|
||||||
|
return _configuration.ProfileApplicationSettings.ApplyInCards ? (id, SpecialResult.Mahjong) : (identifier, SpecialResult.Invalid);
|
||||||
|
|
||||||
|
switch (identifier.Special)
|
||||||
|
{
|
||||||
|
case ScreenActor.GPosePlayer:
|
||||||
|
return (_actorManager.GetCurrentPlayer(), SpecialResult.GPosePlayer);
|
||||||
|
case ScreenActor.CharacterScreen when _configuration.ProfileApplicationSettings.ApplyInCharacterWindow:
|
||||||
|
return (_actorManager.GetCurrentPlayer(), SpecialResult.CharacterScreen);
|
||||||
|
case ScreenActor.FittingRoom when _configuration.ProfileApplicationSettings.ApplyInTryOn:
|
||||||
|
return (_actorManager.GetCurrentPlayer(), SpecialResult.FittingRoom);
|
||||||
|
case ScreenActor.DyePreview when _configuration.ProfileApplicationSettings.ApplyInTryOn:
|
||||||
|
return (_actorManager.GetCurrentPlayer(), SpecialResult.DyePreview);
|
||||||
|
case ScreenActor.Portrait when _configuration.ProfileApplicationSettings.ApplyInCards:
|
||||||
|
return (_actorManager.GetCurrentPlayer(), SpecialResult.Portrait);
|
||||||
|
case ScreenActor.ExamineScreen:
|
||||||
|
{
|
||||||
|
identifier = _actorManager.GetInspectPlayer();
|
||||||
|
if (identifier.IsValid)
|
||||||
|
return (_configuration.ProfileApplicationSettings.ApplyInInspect ? identifier : ActorIdentifier.Invalid, SpecialResult.Inspect);
|
||||||
|
|
||||||
|
identifier = _actorManager.GetCardPlayer();
|
||||||
|
if (identifier.IsValid)
|
||||||
|
return (_configuration.ProfileApplicationSettings.ApplyInInspect ? identifier : ActorIdentifier.Invalid, SpecialResult.Card);
|
||||||
|
|
||||||
|
return _configuration.ProfileApplicationSettings.ApplyInTryOn
|
||||||
|
? (_actorManager.GetGlamourPlayer(), SpecialResult.Glamour) //returns ActorIdentifier.Invalid if player is invalid
|
||||||
|
: (identifier, SpecialResult.Invalid);
|
||||||
|
}
|
||||||
|
default: return (identifier, SpecialResult.Invalid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SpecialResult
|
||||||
|
{
|
||||||
|
PartyBanner,
|
||||||
|
PvPBanner,
|
||||||
|
Mahjong,
|
||||||
|
CharacterScreen,
|
||||||
|
FittingRoom,
|
||||||
|
DyePreview,
|
||||||
|
Portrait,
|
||||||
|
Inspect,
|
||||||
|
Card,
|
||||||
|
Glamour,
|
||||||
|
GPosePlayer,
|
||||||
|
Invalid,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ using CustomizePlus.Profiles.Exceptions;
|
|||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
using Penumbra.GameData.Interop;
|
using Penumbra.GameData.Interop;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
using CustomizePlus.Game.Services;
|
||||||
|
|
||||||
namespace CustomizePlus.Profiles;
|
namespace CustomizePlus.Profiles;
|
||||||
|
|
||||||
@@ -40,6 +41,7 @@ public class ProfileManager : IDisposable
|
|||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
private readonly PluginConfiguration _configuration;
|
private readonly PluginConfiguration _configuration;
|
||||||
private readonly ActorManager _actorManager;
|
private readonly ActorManager _actorManager;
|
||||||
|
private readonly GameObjectService _gameObjectService;
|
||||||
private readonly ProfileChanged _event;
|
private readonly ProfileChanged _event;
|
||||||
private readonly TemplateChanged _templateChangedEvent;
|
private readonly TemplateChanged _templateChangedEvent;
|
||||||
private readonly ReloadEvent _reloadEvent;
|
private readonly ReloadEvent _reloadEvent;
|
||||||
@@ -56,6 +58,7 @@ public class ProfileManager : IDisposable
|
|||||||
Logger logger,
|
Logger logger,
|
||||||
PluginConfiguration configuration,
|
PluginConfiguration configuration,
|
||||||
ActorManager actorManager,
|
ActorManager actorManager,
|
||||||
|
GameObjectService gameObjectService,
|
||||||
ProfileChanged @event,
|
ProfileChanged @event,
|
||||||
TemplateChanged templateChangedEvent,
|
TemplateChanged templateChangedEvent,
|
||||||
ReloadEvent reloadEvent,
|
ReloadEvent reloadEvent,
|
||||||
@@ -67,6 +70,7 @@ public class ProfileManager : IDisposable
|
|||||||
_logger = logger;
|
_logger = logger;
|
||||||
_configuration = configuration;
|
_configuration = configuration;
|
||||||
_actorManager = actorManager;
|
_actorManager = actorManager;
|
||||||
|
_gameObjectService = gameObjectService;
|
||||||
_event = @event;
|
_event = @event;
|
||||||
_templateChangedEvent = templateChangedEvent;
|
_templateChangedEvent = templateChangedEvent;
|
||||||
_templateChangedEvent.Subscribe(OnTemplateChange, TemplateChanged.Priority.ProfileManager);
|
_templateChangedEvent.Subscribe(OnTemplateChange, TemplateChanged.Priority.ProfileManager);
|
||||||
@@ -477,8 +481,7 @@ public class ProfileManager : IDisposable
|
|||||||
//performance: using textual override for ProfileAppliesTo here to not call
|
//performance: using textual override for ProfileAppliesTo here to not call
|
||||||
//GetGameObjectName every time we are trying to check object against profiles
|
//GetGameObjectName every time we are trying to check object against profiles
|
||||||
|
|
||||||
if (actorIdentifier.Type == IdentifierType.Special)
|
(actorIdentifier, _) = _gameObjectService.GetTrueActorForSpecialTypeActor(actorIdentifier);
|
||||||
actorIdentifier = actorIdentifier.GetTrueActorForSpecialType();
|
|
||||||
|
|
||||||
if (!actorIdentifier.IsValid)
|
if (!actorIdentifier.IsValid)
|
||||||
yield break;
|
yield break;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using CustomizePlus.GameData.Extensions;
|
|||||||
using CustomizePlus.GameData.Services;
|
using CustomizePlus.GameData.Services;
|
||||||
using CustomizePlus.Core.Extensions;
|
using CustomizePlus.Core.Extensions;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using CustomizePlus.Game.Services;
|
||||||
|
|
||||||
namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Debug;
|
namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Debug;
|
||||||
|
|
||||||
@@ -20,17 +21,20 @@ public class StateMonitoringTab
|
|||||||
private readonly TemplateManager _templateManager;
|
private readonly TemplateManager _templateManager;
|
||||||
private readonly ArmatureManager _armatureManager;
|
private readonly ArmatureManager _armatureManager;
|
||||||
private readonly ObjectManager _objectManager;
|
private readonly ObjectManager _objectManager;
|
||||||
|
private readonly GameObjectService _gameObjectService;
|
||||||
|
|
||||||
public StateMonitoringTab(
|
public StateMonitoringTab(
|
||||||
ProfileManager profileManager,
|
ProfileManager profileManager,
|
||||||
TemplateManager templateManager,
|
TemplateManager templateManager,
|
||||||
ArmatureManager armatureManager,
|
ArmatureManager armatureManager,
|
||||||
ObjectManager objectManager)
|
ObjectManager objectManager,
|
||||||
|
GameObjectService gameObjectService)
|
||||||
{
|
{
|
||||||
_profileManager = profileManager;
|
_profileManager = profileManager;
|
||||||
_templateManager = templateManager;
|
_templateManager = templateManager;
|
||||||
_armatureManager = armatureManager;
|
_armatureManager = armatureManager;
|
||||||
_objectManager = objectManager;
|
_objectManager = objectManager;
|
||||||
|
_gameObjectService = gameObjectService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw()
|
public void Draw()
|
||||||
@@ -106,8 +110,8 @@ public class StateMonitoringTab
|
|||||||
ImGui.Text($"Special: {kvPair.Key.Special.ToString()}");
|
ImGui.Text($"Special: {kvPair.Key.Special.ToString()}");
|
||||||
ImGui.Text($"ToName: {kvPair.Key.ToName()}");
|
ImGui.Text($"ToName: {kvPair.Key.ToName()}");
|
||||||
ImGui.Text($"ToNameWithoutOwnerName: {kvPair.Key.ToNameWithoutOwnerName()}");
|
ImGui.Text($"ToNameWithoutOwnerName: {kvPair.Key.ToNameWithoutOwnerName()}");
|
||||||
if(kvPair.Key.Type == Penumbra.GameData.Enums.IdentifierType.Special)
|
(var actorIdentifier, var specialResult) = _gameObjectService.GetTrueActorForSpecialTypeActor(kvPair.Key);
|
||||||
ImGui.Text($"True actor: {kvPair.Key.GetTrueActorForSpecialType().ToName()}");
|
ImGui.Text($"True actor: {actorIdentifier.ToName()} ({specialResult})");
|
||||||
|
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using CustomizePlus.Configuration.Data;
|
|||||||
using CustomizePlus.Profiles;
|
using CustomizePlus.Profiles;
|
||||||
using CustomizePlus.Templates;
|
using CustomizePlus.Templates;
|
||||||
using CustomizePlus.Core.Helpers;
|
using CustomizePlus.Core.Helpers;
|
||||||
|
using CustomizePlus.Armatures.Services;
|
||||||
|
|
||||||
namespace CustomizePlus.UI.Windows.MainWindow.Tabs;
|
namespace CustomizePlus.UI.Windows.MainWindow.Tabs;
|
||||||
|
|
||||||
@@ -22,29 +23,23 @@ public class SettingsTab
|
|||||||
private const uint DiscordColor = 0xFFDA8972;
|
private const uint DiscordColor = 0xFFDA8972;
|
||||||
|
|
||||||
private readonly PluginConfiguration _configuration;
|
private readonly PluginConfiguration _configuration;
|
||||||
private readonly TemplateManager _templateManager;
|
private readonly ArmatureManager _armatureManager;
|
||||||
private readonly ProfileManager _profileManager;
|
|
||||||
private readonly HookingService _hookingService;
|
private readonly HookingService _hookingService;
|
||||||
private readonly SaveService _saveService;
|
|
||||||
private readonly TemplateEditorManager _templateEditorManager;
|
private readonly TemplateEditorManager _templateEditorManager;
|
||||||
private readonly CPlusChangeLog _changeLog;
|
private readonly CPlusChangeLog _changeLog;
|
||||||
private readonly MessageService _messageService;
|
private readonly MessageService _messageService;
|
||||||
|
|
||||||
public SettingsTab(
|
public SettingsTab(
|
||||||
PluginConfiguration configuration,
|
PluginConfiguration configuration,
|
||||||
TemplateManager templateManager,
|
ArmatureManager armatureManager,
|
||||||
ProfileManager profileManager,
|
|
||||||
HookingService hookingService,
|
HookingService hookingService,
|
||||||
SaveService saveService,
|
|
||||||
TemplateEditorManager templateEditorManager,
|
TemplateEditorManager templateEditorManager,
|
||||||
CPlusChangeLog changeLog,
|
CPlusChangeLog changeLog,
|
||||||
MessageService messageService)
|
MessageService messageService)
|
||||||
{
|
{
|
||||||
_configuration = configuration;
|
_configuration = configuration;
|
||||||
_templateManager = templateManager;
|
_armatureManager = armatureManager;
|
||||||
_profileManager = profileManager;
|
|
||||||
_hookingService = hookingService;
|
_hookingService = hookingService;
|
||||||
_saveService = saveService;
|
|
||||||
_templateEditorManager = templateEditorManager;
|
_templateEditorManager = templateEditorManager;
|
||||||
_changeLog = changeLog;
|
_changeLog = changeLog;
|
||||||
_messageService = messageService;
|
_messageService = messageService;
|
||||||
@@ -63,6 +58,7 @@ public class SettingsTab
|
|||||||
|
|
||||||
using (var child2 = ImRaii.Child("SettingsChild"))
|
using (var child2 = ImRaii.Child("SettingsChild"))
|
||||||
{
|
{
|
||||||
|
DrawProfileApplicationSettings();
|
||||||
DrawInterface();
|
DrawInterface();
|
||||||
DrawCommands();
|
DrawCommands();
|
||||||
DrawAdvancedSettings();
|
DrawAdvancedSettings();
|
||||||
@@ -96,6 +92,73 @@ public class SettingsTab
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Profile application settings
|
||||||
|
private void DrawProfileApplicationSettings()
|
||||||
|
{
|
||||||
|
var isShouldDraw = ImGui.CollapsingHeader("Profile Application");
|
||||||
|
|
||||||
|
if (!isShouldDraw)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DrawApplyInCharacterWindowCheckbox();
|
||||||
|
DrawApplyInTryOnCheckbox();
|
||||||
|
DrawApplyInCardsCheckbox();
|
||||||
|
DrawApplyInInspectCheckbox();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawApplyInCharacterWindowCheckbox()
|
||||||
|
{
|
||||||
|
var isChecked = _configuration.ProfileApplicationSettings.ApplyInCharacterWindow;
|
||||||
|
|
||||||
|
if (CtrlHelper.CheckboxWithTextAndHelp("##applyincharwindow", "Apply Profiles in Character Window",
|
||||||
|
"Apply profile for your character in your main character window, if it is set.", ref isChecked))
|
||||||
|
{
|
||||||
|
_configuration.ProfileApplicationSettings.ApplyInCharacterWindow = isChecked;
|
||||||
|
_configuration.Save();
|
||||||
|
_armatureManager.RebindAllArmatures();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawApplyInTryOnCheckbox()
|
||||||
|
{
|
||||||
|
var isChecked = _configuration.ProfileApplicationSettings.ApplyInTryOn;
|
||||||
|
|
||||||
|
if (CtrlHelper.CheckboxWithTextAndHelp("##applyintryon", "Apply Profiles in Try-On Window",
|
||||||
|
"Apply profile for your character in your try-on, dye preview or glamour plate window, if it is set.", ref isChecked))
|
||||||
|
{
|
||||||
|
_configuration.ProfileApplicationSettings.ApplyInTryOn = isChecked;
|
||||||
|
_configuration.Save();
|
||||||
|
_armatureManager.RebindAllArmatures();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawApplyInCardsCheckbox()
|
||||||
|
{
|
||||||
|
var isChecked = _configuration.ProfileApplicationSettings.ApplyInCards;
|
||||||
|
|
||||||
|
if (CtrlHelper.CheckboxWithTextAndHelp("##applyincards", "Apply Profiles in Adventurer Cards",
|
||||||
|
"Apply appropriate profile for the adventurer card you are currently looking at.", ref isChecked))
|
||||||
|
{
|
||||||
|
_configuration.ProfileApplicationSettings.ApplyInCards = isChecked;
|
||||||
|
_configuration.Save();
|
||||||
|
_armatureManager.RebindAllArmatures();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawApplyInInspectCheckbox()
|
||||||
|
{
|
||||||
|
var isChecked = _configuration.ProfileApplicationSettings.ApplyInInspect;
|
||||||
|
|
||||||
|
if (CtrlHelper.CheckboxWithTextAndHelp("##applyininspect", "Apply Profiles in Inspect Window",
|
||||||
|
"Apply appropriate profile for the character you are currently inspecting.", ref isChecked))
|
||||||
|
{
|
||||||
|
_configuration.ProfileApplicationSettings.ApplyInInspect = isChecked;
|
||||||
|
_configuration.Save();
|
||||||
|
_armatureManager.RebindAllArmatures();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Chat Commands Settings
|
#region Chat Commands Settings
|
||||||
private void DrawCommands()
|
private void DrawCommands()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user