diff --git a/PlayerTags/Plugin.cs b/PlayerTags/Plugin.cs index 08de897..8c80811 100644 --- a/PlayerTags/Plugin.cs +++ b/PlayerTags/Plugin.cs @@ -216,6 +216,7 @@ namespace PlayerTags private void UiBuilder_OpenConfigUi() { m_PluginConfiguration.IsVisible = true; + m_PluginConfiguration.Save(m_PluginData); } private void Chat_ChatMessage(XivChatType type, uint senderId, ref SeString sender, ref SeString message, ref bool isHandled) diff --git a/PlayerTags/PluginConfiguration.cs b/PlayerTags/PluginConfiguration.cs index bcb2c93..255f62e 100644 --- a/PlayerTags/PluginConfiguration.cs +++ b/PlayerTags/PluginConfiguration.cs @@ -17,7 +17,7 @@ namespace PlayerTags public NameplateTitlePosition NameplateTitlePosition = NameplateTitlePosition.AlwaysAboveName; public bool IsPlayerNameRandomlyGenerated = false; public bool IsCustomTagContextMenuEnabled = true; - public bool IsShowInheritedPropertiesEnabled = false; + public bool IsShowInheritedPropertiesEnabled = true; [JsonProperty(TypeNameHandling = TypeNameHandling.None, ItemTypeNameHandling = TypeNameHandling.None)] public Dictionary AllTagsChanges = new Dictionary(); diff --git a/PlayerTags/PluginConfigurationUI.cs b/PlayerTags/PluginConfigurationUI.cs index 4f28ad0..75bab0f 100644 --- a/PlayerTags/PluginConfigurationUI.cs +++ b/PlayerTags/PluginConfigurationUI.cs @@ -87,13 +87,11 @@ namespace PlayerTags ImGui.EndGroup(); ImGui.NextColumn(); - ImGui.BeginGroup(); var selectedTag = m_PluginData.AllTags.Descendents.SingleOrDefault(descendent => descendent.IsSelected.Value); if (selectedTag != null) { DrawControls(selectedTag); } - ImGui.EndGroup(); ImGui.EndGroup(); ImGui.TreePop(); @@ -369,7 +367,6 @@ namespace PlayerTags ImGui.PushID(tag.GetHashCode().ToString()); ImGui.TreePush(); - // Render the add property override button and popup if (ImGui.IsPopupOpen("AddPopup")) { @@ -382,8 +379,6 @@ namespace PlayerTags ImGui.PushStyleColor(ImGuiCol.ButtonHovered, new Vector4(0.2f, 0.6f, 0.2f, 1)); ImGui.PushStyleColor(ImGuiCol.ButtonActive, new Vector4(0.2f, 0.6f, 0.2f, 1)); - ImGui.Text(""); - ImGui.PushFont(UiBuilder.IconFont); if (ImGui.Button(FontAwesomeIcon.Plus.ToIconString(), new Vector2(23, 23))) { @@ -543,7 +538,8 @@ namespace PlayerTags private void DrawInheritable(string localizedStringName, InheritableValue inheritable) { - if (inheritable.Behavior == InheritableBehavior.Inherit) + bool isDisabled = inheritable.Behavior == InheritableBehavior.Inherit; + if (isDisabled) { ImGui.PushStyleVar(ImGuiStyleVar.Alpha, 0.25f); } @@ -552,13 +548,13 @@ namespace PlayerTags ImGui.BeginChild(inheritable.GetHashCode().ToString(), new Vector2(0 , 50)); ImGui.Text(Localizer.GetString(localizedStringName, false)); - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { ImGui.SameLine(); ImGui.TextColored(new Vector4(0.66f, 0.5f, 0.5f, 1), Strings.Loc_Static_Inherited); } - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { bool value = inheritable.InheritedValue != null ? inheritable.InheritedValue.Value : false; DrawCheckbox("IsEnabled", false, ref value, () => @@ -579,7 +575,7 @@ namespace PlayerTags ImGui.EndChild(); ImGui.EndGroup(); - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { ImGui.PopStyleVar(); } @@ -588,7 +584,8 @@ namespace PlayerTags private void DrawInheritable(string localizedStringName, bool shouldLocalizeNames, bool shouldOrderNames, InheritableValue inheritable) where TEnum : struct, Enum { - if (inheritable.Behavior == InheritableBehavior.Inherit) + bool isDisabled = inheritable.Behavior == InheritableBehavior.Inherit; + if (isDisabled) { ImGui.PushStyleVar(ImGuiStyleVar.Alpha, 0.25f); } @@ -597,13 +594,13 @@ namespace PlayerTags ImGui.BeginChild(inheritable.GetHashCode().ToString(), new Vector2(0, 50)); ImGui.Text(Localizer.GetString(localizedStringName, false)); - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { ImGui.SameLine(); ImGui.TextColored(new Vector4(0.66f, 0.5f, 0.5f, 1), Strings.Loc_Static_Inherited); } - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { bool isEnabled = inheritable.InheritedValue != null; DrawCheckbox("IsEnabled", false, ref isEnabled, () => { }); @@ -650,7 +647,7 @@ namespace PlayerTags ImGui.EndChild(); ImGui.EndGroup(); - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { ImGui.PopStyleVar(); } @@ -658,7 +655,8 @@ namespace PlayerTags private void DrawInheritable(string localizedStringName, InheritableValue inheritable) { - if (inheritable.Behavior == InheritableBehavior.Inherit) + bool isDisabled = inheritable.Behavior == InheritableBehavior.Inherit; + if (isDisabled) { ImGui.PushStyleVar(ImGuiStyleVar.Alpha, 0.25f); } @@ -667,13 +665,13 @@ namespace PlayerTags ImGui.BeginChild(inheritable.GetHashCode().ToString(), new Vector2(180, 50)); ImGui.Text(Localizer.GetString(localizedStringName, false)); - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { ImGui.SameLine(); ImGui.TextColored(new Vector4(0.66f, 0.5f, 0.5f, 1), Strings.Loc_Static_Inherited); } - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { bool isEnabled = inheritable.InheritedValue != null; DrawCheckbox("IsEnabled", false, ref isEnabled, () => { }); @@ -749,7 +747,7 @@ namespace PlayerTags ImGui.EndChild(); ImGui.EndGroup(); - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { ImGui.PopStyleVar(); } @@ -757,7 +755,8 @@ namespace PlayerTags private void DrawInheritable(string localizedStringName, InheritableReference inheritable) { - if (inheritable.Behavior == InheritableBehavior.Inherit) + bool isDisabled = inheritable.Behavior == InheritableBehavior.Inherit; + if (isDisabled) { ImGui.PushStyleVar(ImGuiStyleVar.Alpha, 0.25f); } @@ -766,13 +765,13 @@ namespace PlayerTags ImGui.BeginChild(inheritable.GetHashCode().ToString(), new Vector2(0, 50)); ImGui.Text(Localizer.GetString(localizedStringName, false)); - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { ImGui.SameLine(); ImGui.TextColored(new Vector4(0.66f, 0.5f, 0.5f, 1), Strings.Loc_Static_Inherited); } - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { bool isEnabled = inheritable.InheritedValue != null; DrawCheckbox("IsEnabled", false, ref isEnabled, () => @@ -821,7 +820,7 @@ namespace PlayerTags ImGui.EndChild(); ImGui.EndGroup(); - if (inheritable.Behavior == InheritableBehavior.Inherit) + if (isDisabled) { ImGui.PopStyleVar(); } diff --git a/PlayerTags/Resources/Strings.Designer.cs b/PlayerTags/Resources/Strings.Designer.cs index a0b378c..d7b4ef5 100644 --- a/PlayerTags/Resources/Strings.Designer.cs +++ b/PlayerTags/Resources/Strings.Designer.cs @@ -133,7 +133,7 @@ namespace PlayerTags.Resources { } /// - /// Looks up a localized string similar to Enable context menu options for custom tags. + /// Looks up a localized string similar to Enable context menu integration. /// public static string Loc_IsCustomTagContextMenuEnabled { get { @@ -889,7 +889,7 @@ namespace PlayerTags.Resources { } /// - /// Looks up a localized string similar to Text color. + /// Looks up a localized string similar to Text glow color. /// public static string Loc_TextGlowColor { get { @@ -900,9 +900,9 @@ namespace PlayerTags.Resources { /// /// Looks up a localized string similar to The glow color of the text in the tag.. /// - public static string Loc_TextGlowolor_Description { + public static string Loc_TextGlowColor_Description { get { - return ResourceManager.GetString("Loc_TextGlowolor_Description", resourceCulture); + return ResourceManager.GetString("Loc_TextGlowColor_Description", resourceCulture); } } } diff --git a/PlayerTags/Resources/Strings.resx b/PlayerTags/Resources/Strings.resx index d5bcc6a..1ebd8dc 100644 --- a/PlayerTags/Resources/Strings.resx +++ b/PlayerTags/Resources/Strings.resx @@ -154,7 +154,7 @@ Expanded - Enable context menu options for custom tags + Enable context menu integration When opening the player context menu, options will be available to add and remove custom tags for the selected player.