Skip to content

Commit

Permalink
AutoHook 3.0.3.0 [PUSH]
Browse files Browse the repository at this point in the history
yippy
  • Loading branch information
InitialDet committed Feb 7, 2024
1 parent 769f647 commit a327f45
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 61 deletions.
14 changes: 14 additions & 0 deletions AutoHook/PluginUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,20 @@ public static class PluginChangeLog
{
public static readonly List<Version> 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 =
Expand Down
10 changes: 9 additions & 1 deletion AutoHook/Resources/Localization/UIStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions AutoHook/Resources/Localization/UIStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,9 @@ This could save you 100gp if going only for mooches</value>
<data name="Surface_Slap" xml:space="preserve">
<value>Surface Slap</value>
</data>
<data name="Surface_Slap_Options" xml:space="preserve">
<value>Surface Slap Options</value>
</data>
<data name="Identical_Cast" xml:space="preserve">
<value>Identical Cast</value>
</data>
Expand Down
112 changes: 52 additions & 60 deletions AutoHook/Ui/SubTabBaitMooch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a327f45

Please sign in to comment.