From a327f4588c58a44118e50559758692ca4005bcbe Mon Sep 17 00:00:00 2001 From: Det Date: Wed, 7 Feb 2024 12:09:22 -0300 Subject: [PATCH] AutoHook 3.0.3.0 [PUSH] yippy --- AutoHook/PluginUI.cs | 14 +++ .../Localization/UIStrings.Designer.cs | 10 +- .../Resources/Localization/UIStrings.resx | 3 + AutoHook/Ui/SubTabBaitMooch.cs | 112 ++++++++---------- 4 files changed, 78 insertions(+), 61 deletions(-) diff --git a/AutoHook/PluginUI.cs b/AutoHook/PluginUI.cs index b74ee35..9fab9c8 100644 --- a/AutoHook/PluginUI.cs +++ b/AutoHook/PluginUI.cs @@ -310,6 +310,20 @@ public static class PluginChangeLog { public static readonly List Versions = new() { + new Version("3.0.3.0") + { + MainChanges = + { + "(by Jaksuhn) Added swap preset/bait on Spectral Currents", + "(by Jaksuhn) Added more Surface Slap options", + "(by Jaksuhn) Added option to chum only when intution duration is greater than x seconds", + }, + MinorChanges = + { + "Fixed an issue with swapping both preset and bait at the same time", + "More IPC options" + } + }, new Version("3.0.2.0") { MainChanges = diff --git a/AutoHook/Resources/Localization/UIStrings.Designer.cs b/AutoHook/Resources/Localization/UIStrings.Designer.cs index abab567..7e38030 100644 --- a/AutoHook/Resources/Localization/UIStrings.Designer.cs +++ b/AutoHook/Resources/Localization/UIStrings.Designer.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -1777,6 +1776,15 @@ internal static string Surface_Slap { } } + /// + /// Looks up a localized string similar to Surface Slap Options. + /// + internal static string Surface_Slap_Options { + get { + return ResourceManager.GetString("Surface_Slap_Options", resourceCulture); + } + } + /// /// Looks up a localized string similar to Surface Slap & Identical Cast. /// diff --git a/AutoHook/Resources/Localization/UIStrings.resx b/AutoHook/Resources/Localization/UIStrings.resx index 2bbb8ff..297489c 100644 --- a/AutoHook/Resources/Localization/UIStrings.resx +++ b/AutoHook/Resources/Localization/UIStrings.resx @@ -549,6 +549,9 @@ This could save you 100gp if going only for mooches Surface Slap + + Surface Slap Options + Identical Cast diff --git a/AutoHook/Ui/SubTabBaitMooch.cs b/AutoHook/Ui/SubTabBaitMooch.cs index 6aa29e8..e1ce8d4 100644 --- a/AutoHook/Ui/SubTabBaitMooch.cs +++ b/AutoHook/Ui/SubTabBaitMooch.cs @@ -163,19 +163,24 @@ private void DrawSelectTugs(string hook, ref bool enabled, ref HookType type, re } ImGui.Spacing(); - - if (DrawUtil.Checkbox(UIStrings.OnlyUseWhenActiveSurfaceSlap, ref hookOnlyWhenActiveSlap)) + + if (ImGui.TreeNodeEx(UIStrings.Surface_Slap_Options, ImGuiTreeNodeFlags.FramePadding)) { - hookOnlyWhenNOTActiveSlap = false; - Service.Save(); - } + if (DrawUtil.Checkbox(UIStrings.OnlyUseWhenActiveSurfaceSlap, ref hookOnlyWhenActiveSlap)) + { + hookOnlyWhenNOTActiveSlap = false; + Service.Save(); + } - if (DrawUtil.Checkbox(UIStrings.OnlyUseWhenNOTActiveSurfaceSlap, ref hookOnlyWhenNOTActiveSlap)) - { - hookOnlyWhenActiveSlap = false; - Service.Save(); + if (DrawUtil.Checkbox(UIStrings.OnlyUseWhenNOTActiveSurfaceSlap, ref hookOnlyWhenNOTActiveSlap)) + { + hookOnlyWhenActiveSlap = false; + Service.Save(); + } + + ImGui.TreePop(); } - + ImGui.TreePop(); } @@ -238,65 +243,52 @@ private void DrawInputDoubleMinTime(HookConfig hookConfig) private void DrawChumMinMaxTime(HookConfig hookConfig) { - if (ImGui.Button(UIStrings.ChumTimer)) - { - ImGui.OpenPopup(str_id: "chum_timer"); - } - - if (ImGui.BeginPopup("chum_timer")) - { - ImGui.Spacing(); - if (DrawUtil.Checkbox(UIStrings.EnableChumTimers, ref hookConfig.UseChumTimer, - UIStrings.EnableChumTimersHelpMarker)) + DrawUtil.DrawCheckboxTree(UIStrings.EnableChumTimers, ref hookConfig.UseChumTimer, + () => { - Service.Save(); - } - - ImGui.Separator(); - - ImGui.SetNextItemWidth(100 * ImGuiHelpers.GlobalScale); - if (ImGui.InputDouble(UIStrings.MinWait, ref hookConfig.MinChumTimeDelay, .1, 1, "%.1f%")) - { - switch (hookConfig.MinChumTimeDelay) + ImGui.SetNextItemWidth(100 * ImGuiHelpers.GlobalScale); + if (ImGui.InputDouble(UIStrings.MinWait, ref hookConfig.MinChumTimeDelay, .1, 1, "%.1f%")) { - case <= 0: - hookConfig.MinChumTimeDelay = 0; - break; - case > 99: - hookConfig.MinChumTimeDelay = 99; - break; + switch (hookConfig.MinChumTimeDelay) + { + case <= 0: + hookConfig.MinChumTimeDelay = 0; + break; + case > 99: + hookConfig.MinChumTimeDelay = 99; + break; + } + Service.Save(); } - Service.Save(); - } - ImGui.SameLine(); - ImGuiComponents.HelpMarker(UIStrings.HelpMarkerMinWaitTimer); + ImGui.SameLine(); + ImGuiComponents.HelpMarker(UIStrings.HelpMarkerMinWaitTimer); - ImGui.SetNextItemWidth(100 * ImGuiHelpers.GlobalScale); - if (ImGui.InputDouble(UIStrings.MaxWait, ref hookConfig.MaxChumTimeDelay, .1, 1, "%.1f%")) - { - switch (hookConfig.MaxChumTimeDelay) + ImGui.SetNextItemWidth(100 * ImGuiHelpers.GlobalScale); + if (ImGui.InputDouble(UIStrings.MaxWait, ref hookConfig.MaxChumTimeDelay, .1, 1, "%.1f%")) { - case 0.1: - hookConfig.MaxChumTimeDelay = 2; - break; - case <= 0: - case <= 1.9: //This makes the option turn off if delay = 2 seconds when clicking the minus. - hookConfig.MaxChumTimeDelay = 0; - break; - case > 99: - hookConfig.MaxChumTimeDelay = 99; - break; + switch (hookConfig.MaxChumTimeDelay) + { + case 0.1: + hookConfig.MaxChumTimeDelay = 2; + break; + case <= 0: + case <= 1.9: //This makes the option turn off if delay = 2 seconds when clicking the minus. + hookConfig.MaxChumTimeDelay = 0; + break; + case > 99: + hookConfig.MaxChumTimeDelay = 99; + break; + } + Service.Save(); } - Service.Save(); - } - - ImGui.SameLine(); - ImGuiComponents.HelpMarker(UIStrings.HelpMarkerMaxWaitTimer); + ImGui.SameLine(); - ImGui.EndPopup(); - } + ImGuiComponents.HelpMarker(UIStrings.HelpMarkerMaxWaitTimer); + } + , UIStrings.EnableChumTimersHelpMarker); + } private void DrawEnabledButtonCustomBait(HookConfig hookConfig)