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:
@@ -11,6 +11,7 @@ using CustomizePlus.GameData.Extensions;
|
||||
using CustomizePlus.GameData.Services;
|
||||
using CustomizePlus.Core.Extensions;
|
||||
using System.Numerics;
|
||||
using CustomizePlus.Game.Services;
|
||||
|
||||
namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Debug;
|
||||
|
||||
@@ -20,17 +21,20 @@ public class StateMonitoringTab
|
||||
private readonly TemplateManager _templateManager;
|
||||
private readonly ArmatureManager _armatureManager;
|
||||
private readonly ObjectManager _objectManager;
|
||||
private readonly GameObjectService _gameObjectService;
|
||||
|
||||
public StateMonitoringTab(
|
||||
ProfileManager profileManager,
|
||||
TemplateManager templateManager,
|
||||
ArmatureManager armatureManager,
|
||||
ObjectManager objectManager)
|
||||
ObjectManager objectManager,
|
||||
GameObjectService gameObjectService)
|
||||
{
|
||||
_profileManager = profileManager;
|
||||
_templateManager = templateManager;
|
||||
_armatureManager = armatureManager;
|
||||
_objectManager = objectManager;
|
||||
_gameObjectService = gameObjectService;
|
||||
}
|
||||
|
||||
public void Draw()
|
||||
@@ -106,8 +110,8 @@ public class StateMonitoringTab
|
||||
ImGui.Text($"Special: {kvPair.Key.Special.ToString()}");
|
||||
ImGui.Text($"ToName: {kvPair.Key.ToName()}");
|
||||
ImGui.Text($"ToNameWithoutOwnerName: {kvPair.Key.ToNameWithoutOwnerName()}");
|
||||
if(kvPair.Key.Type == Penumbra.GameData.Enums.IdentifierType.Special)
|
||||
ImGui.Text($"True actor: {kvPair.Key.GetTrueActorForSpecialType().ToName()}");
|
||||
(var actorIdentifier, var specialResult) = _gameObjectService.GetTrueActorForSpecialTypeActor(kvPair.Key);
|
||||
ImGui.Text($"True actor: {actorIdentifier.ToName()} ({specialResult})");
|
||||
|
||||
ImGui.Spacing();
|
||||
ImGui.Spacing();
|
||||
|
||||
@@ -14,6 +14,7 @@ using CustomizePlus.Configuration.Data;
|
||||
using CustomizePlus.Profiles;
|
||||
using CustomizePlus.Templates;
|
||||
using CustomizePlus.Core.Helpers;
|
||||
using CustomizePlus.Armatures.Services;
|
||||
|
||||
namespace CustomizePlus.UI.Windows.MainWindow.Tabs;
|
||||
|
||||
@@ -22,29 +23,23 @@ public class SettingsTab
|
||||
private const uint DiscordColor = 0xFFDA8972;
|
||||
|
||||
private readonly PluginConfiguration _configuration;
|
||||
private readonly TemplateManager _templateManager;
|
||||
private readonly ProfileManager _profileManager;
|
||||
private readonly ArmatureManager _armatureManager;
|
||||
private readonly HookingService _hookingService;
|
||||
private readonly SaveService _saveService;
|
||||
private readonly TemplateEditorManager _templateEditorManager;
|
||||
private readonly CPlusChangeLog _changeLog;
|
||||
private readonly MessageService _messageService;
|
||||
|
||||
public SettingsTab(
|
||||
PluginConfiguration configuration,
|
||||
TemplateManager templateManager,
|
||||
ProfileManager profileManager,
|
||||
ArmatureManager armatureManager,
|
||||
HookingService hookingService,
|
||||
SaveService saveService,
|
||||
TemplateEditorManager templateEditorManager,
|
||||
CPlusChangeLog changeLog,
|
||||
MessageService messageService)
|
||||
{
|
||||
_configuration = configuration;
|
||||
_templateManager = templateManager;
|
||||
_profileManager = profileManager;
|
||||
_armatureManager = armatureManager;
|
||||
_hookingService = hookingService;
|
||||
_saveService = saveService;
|
||||
_templateEditorManager = templateEditorManager;
|
||||
_changeLog = changeLog;
|
||||
_messageService = messageService;
|
||||
@@ -63,6 +58,7 @@ public class SettingsTab
|
||||
|
||||
using (var child2 = ImRaii.Child("SettingsChild"))
|
||||
{
|
||||
DrawProfileApplicationSettings();
|
||||
DrawInterface();
|
||||
DrawCommands();
|
||||
DrawAdvancedSettings();
|
||||
@@ -96,6 +92,73 @@ public class SettingsTab
|
||||
}
|
||||
#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
|
||||
private void DrawCommands()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user