More IPC work
Additional checks to make sure profile update event is not getting sent when editor and default profile is involved Selected default profile can no longer be changed if profile set as default is enabled Fixed "Limit to my creatures" not ignoring objects with IdentifierType != Owned IPC test tab no longer initializes IPC if debug mode is disabled Fixed incorrect warning priority in plugin state control Some slight text changes
This commit is contained in:
@@ -19,6 +19,7 @@ using System.Collections.Generic;
|
||||
using IPCProfileDataTuple = (System.Guid UniqueId, string Name, string VirtualPath, string CharacterName, bool IsEnabled);
|
||||
using OtterGui.Log;
|
||||
using CustomizePlus.Core.Extensions;
|
||||
using CustomizePlus.Configuration.Data;
|
||||
|
||||
namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Debug;
|
||||
|
||||
@@ -85,7 +86,8 @@ public class IPCTestTab //: IDisposable
|
||||
ObjectManager objectManager,
|
||||
GameObjectService gameObjectService,
|
||||
ActorManager actorManager,
|
||||
Logger logger)
|
||||
Logger logger,
|
||||
PluginConfiguration configuration)
|
||||
{
|
||||
_objectTable = objectTable;
|
||||
_profileManager = profileManager;
|
||||
@@ -95,7 +97,8 @@ public class IPCTestTab //: IDisposable
|
||||
_actorManager = actorManager;
|
||||
_logger = logger;
|
||||
|
||||
EzIPC.Init(this, "CustomizePlus");
|
||||
if(configuration.DebuggingModeEnabled)
|
||||
EzIPC.Init(this, "CustomizePlus"); //do not init EzIPC if debugging disabled so no debug event hook is created
|
||||
|
||||
if (_getApiVersionIpcFunc != null)
|
||||
_apiVersion = _getApiVersionIpcFunc();
|
||||
|
||||
@@ -12,6 +12,10 @@ using CustomizePlus.Configuration.Data;
|
||||
using CustomizePlus.Profiles.Data;
|
||||
using CustomizePlus.UI.Windows.Controls;
|
||||
using CustomizePlus.Templates;
|
||||
using CustomizePlus.Core.Helpers;
|
||||
using System.Windows.Forms;
|
||||
using CustomizePlus.Core.Data;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Profiles;
|
||||
|
||||
@@ -147,16 +151,28 @@ public class ProfilePanel
|
||||
{
|
||||
if (ImGui.Checkbox("##Enabled", ref enabled))
|
||||
_manager.SetEnabled(_selector.Selected!, enabled);
|
||||
ImGuiUtil.LabeledHelpMarker("Enabled",
|
||||
"Whether the templates in this profile should be applied at all. Only one profile can be enabled for a character at the same time.");
|
||||
}
|
||||
ImGuiUtil.LabeledHelpMarker("Enabled",
|
||||
"Whether the templates in this profile should be applied at all. Only one profile can be enabled for a character at the same time.");
|
||||
|
||||
ImGui.SameLine();
|
||||
var isDefault = _manager.DefaultProfile == _selector.Selected;
|
||||
if (ImGui.Checkbox("##DefaultProfile", ref isDefault))
|
||||
_manager.SetDefaultProfile(isDefault ? _selector.Selected! : null);
|
||||
ImGuiUtil.LabeledHelpMarker("Default profile (Players and Retainers only)",
|
||||
"Whether the templates in this profile are applied to all players and retainers without a specific profile. Only one profile can be default at the same time.");
|
||||
var isDefaultEnabled = _manager.DefaultProfile?.Enabled ?? false;
|
||||
using (ImRaii.Disabled(isDefaultEnabled))
|
||||
{
|
||||
if (ImGui.Checkbox("##DefaultProfile", ref isDefault))
|
||||
_manager.SetDefaultProfile(isDefault ? _selector.Selected! : null);
|
||||
ImGuiUtil.LabeledHelpMarker("Default profile (Players and Retainers only)",
|
||||
"Whether the templates in this profile are applied to all players and retainers without a specific profile. Only one profile can be default at the same time.");
|
||||
}
|
||||
if(isDefaultEnabled)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
ImGui.PushStyleColor(ImGuiCol.Text, Constants.Colors.Warning);
|
||||
ImGuiUtil.PrintIcon(FontAwesomeIcon.ExclamationTriangle);
|
||||
ImGui.PopStyleColor();
|
||||
ImGuiUtil.HoverTooltip("Can only be changed while the default profile is disabled.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +240,7 @@ public class ProfilePanel
|
||||
if (ImGui.Checkbox("##LimitLookupToOwnedObjects", ref enabled))
|
||||
_manager.SetLimitLookupToOwned(_selector.Selected!, enabled);
|
||||
ImGuiUtil.LabeledHelpMarker("Limit to my creatures",
|
||||
"When enabled limits the character search to only your own summons, mounts and minions.\nUseful when there is possibility there will be another character with that name owned by another player.\n* For battle chocobo use \"Chocobo\" as character name.\n** If you are changing root scale for mount and want to keep your scale make sure your own scale is set to anything other than default value.");
|
||||
"When enabled limits the character search to only your own summons, mounts and minions.\nUseful when there is possibility there will be another character with that name owned by another player.\n* For battle chocobo use \"Chocobo\" as character name.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ public class SettingsTab
|
||||
{
|
||||
var isChecked = _configuration.DebuggingModeEnabled;
|
||||
if (CtrlHelper.CheckboxWithTextAndHelp("##debugmode", "Debug mode",
|
||||
"Enables debug mode", ref isChecked))
|
||||
"Enables debug mode. Requires plugin restart for all features to become properly initialized.", ref isChecked))
|
||||
{
|
||||
_configuration.DebuggingModeEnabled = isChecked;
|
||||
_configuration.Save();
|
||||
|
||||
Reference in New Issue
Block a user