From 8a3a6399b2f6d8c476698542b7b44950795be201 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Fri, 26 Apr 2024 20:02:23 +0200 Subject: [PATCH] Make assignment chat message optional --- ARControl/ARControl.csproj | 2 +- ARControl/AutoRetainerControlPlugin.cs | 3 ++- ARControl/Configuration.cs | 1 + ARControl/Windows/ConfigWindow.cs | 18 +++++++++++++----- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ARControl/ARControl.csproj b/ARControl/ARControl.csproj index db82bad..dbdd5ce 100644 --- a/ARControl/ARControl.csproj +++ b/ARControl/ARControl.csproj @@ -1,7 +1,7 @@ net8.0-windows - 4.0 + 4.1 12 enable true diff --git a/ARControl/AutoRetainerControlPlugin.cs b/ARControl/AutoRetainerControlPlugin.cs index 1098588..89f4d21 100644 --- a/ARControl/AutoRetainerControlPlugin.cs +++ b/ARControl/AutoRetainerControlPlugin.cs @@ -229,7 +229,8 @@ public sealed partial class AutoRetainerControlPlugin : IDalamudPlugin } else { - PrintNextVentureMessage(retainerName, venture, reward, list); + if (_configuration.ConfigUiOptions.ShowAssignmentChatMessages || dryRun) + PrintNextVentureMessage(retainerName, venture, reward, list); if (!dryRun) { diff --git a/ARControl/Configuration.cs b/ARControl/Configuration.cs index 5ed7725..25d45cd 100644 --- a/ARControl/Configuration.cs +++ b/ARControl/Configuration.cs @@ -122,5 +122,6 @@ internal sealed class Configuration : IPluginConfiguration public bool CheckGatheredItemsPerCharacter { get; set; } public bool OnlyShowMissingGatheredItems { get; set; } public bool WrapAroundWhenReordering { get; set; } + public bool ShowAssignmentChatMessages { get; set; } = true; } } diff --git a/ARControl/Windows/ConfigWindow.cs b/ARControl/Windows/ConfigWindow.cs index f981b48..d982b0a 100644 --- a/ARControl/Windows/ConfigWindow.cs +++ b/ARControl/Windows/ConfigWindow.cs @@ -1119,11 +1119,11 @@ internal sealed class ConfigWindow : LWindow ImGui.PushFont(UiBuilder.IconFont); ImGui.SetNextItemWidth(ImGui.GetContentRegionAvail().X - - ImGui.CalcTextSize(FontAwesomeIcon.ArrowUp.ToIconString()).X - - ImGui.CalcTextSize(FontAwesomeIcon.ArrowDown.ToIconString()).X - - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - - ImGui.GetStyle().FramePadding.X * 6 - - ImGui.GetStyle().ItemSpacing.X * 2); + ImGui.CalcTextSize(FontAwesomeIcon.ArrowUp.ToIconString()).X - + ImGui.CalcTextSize(FontAwesomeIcon.ArrowDown.ToIconString()).X - + ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - + ImGui.GetStyle().FramePadding.X * 6 - + ImGui.GetStyle().ItemSpacing.X * 2); ImGui.PopFont(); if (ImGui.Combo("", ref listIndex, itemLists.Select(x => x.Name).ToArray(), itemLists.Count)) { @@ -1262,6 +1262,14 @@ internal sealed class ConfigWindow : LWindow ImGui.Text("User Interface Settings"); + bool showAssignmentChatMessages = _configuration.ConfigUiOptions.ShowAssignmentChatMessages; + if (ImGui.Checkbox("Show chat message when assigning a venture to a retainer", + ref showAssignmentChatMessages)) + { + _configuration.ConfigUiOptions.ShowAssignmentChatMessages = showAssignmentChatMessages; + Save(); + } + bool showContents = _configuration.ConfigUiOptions.ShowVentureListContents; if (ImGui.Checkbox("Show Venture List preview in Groups/Retainer tabs", ref showContents)) {