Skip to content

Commit

Permalink
AutoHook 3.0.4.1 [PUSH]
Browse files Browse the repository at this point in the history
  • Loading branch information
InitialDet committed Feb 8, 2024
1 parent 388eaff commit 133f8cb
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 14 deletions.
2 changes: 1 addition & 1 deletion AutoHook/AutoHook.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Authors>Det</Authors>
<Version>3.0.4.0</Version>
<Version>3.0.4.1</Version>
<Description>Auto hooks for you</Description>
<PackageProjectUrl>https://github.com/InitialDet/AutoHook</PackageProjectUrl>
<Configurations>Release;Debug</Configurations>
Expand Down
6 changes: 3 additions & 3 deletions AutoHook/AutoHook.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"Author": "Det",
"Name": "Auto Hook",
"Punchline": "Makes fishing less (or more) boring",
"Name": "(old) Auto Hook",
"Punchline": "New Repo: https://puni.sh/plugin/AutoHook",
"Description": "It hooks the fish for you, can you believe it?",
"InternalName": "AutoHook",
"RepoUrl": "https://github.com/InitialDet/AutoHook",
"RepoUrl": "https://puni.sh/plugin/AutoHook",
"ApplicableVersion": "any",
"Tags": [ "Gathering", "Fishing" ],
"DalamudApiLevel": 9,
Expand Down
50 changes: 40 additions & 10 deletions AutoHook/PluginUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void Dispose()
private void DrawTransitionPopup()
{
var windowSize = new Vector2(1024 * ImGuiHelpers.GlobalScale,
ImGui.GetTextLineHeightWithSpacing() * 1 + 2 * ImGui.GetFrameHeightWithSpacing());
ImGui.GetTextLineHeightWithSpacing() * 4 + 2 * ImGui.GetFrameHeightWithSpacing());

ImGui.SetNextWindowSize(windowSize);
ImGui.SetNextWindowPos((ImGui.GetIO().DisplaySize - windowSize) / 2);
Expand All @@ -61,21 +61,42 @@ private void DrawTransitionPopup()

if (!popup)
return;

ImGui.TextWrapped($"Hello, thank you for updating AutoHook. This is a one-time message just to inform you that AutoHook has moved plugin repositories. This will be the last update on the current repository. You will have to transition to the new repository to recieve further updates.");


string hello = "Hello, thank you for updating AutoHook.";
// center the text
ImGui.SetCursorPosX((ImGui.GetWindowSize().X - ImGui.CalcTextSize(hello).X) / 2);
ImGui.TextColored(ImGuiColors.DalamudYellow, hello);

ImGui.TextWrapped($"This is a one-time message just to inform you that AutoHook has moved plugin repositories.\nThis will be the last update on the current repository.");

string warning = "You will have to transition to the new repository to recieve further updates.";

ImGui.GetIO().FontGlobalScale = 1.25f;
ImGui.PushFont(ImGui.GetFont());
ImGui.TextColored(ImGuiColors.HealerGreen, warning);

ImGui.GetIO().FontGlobalScale = 1f;
ImGui.PopFont();

ImGui.SetCursorPosY(ImGui.GetWindowSize().Y - ImGui.GetFrameHeight() - ImGui.GetStyle().WindowPadding.Y);
if (ImGui.Button("Ok, I understand", new(ImGui.GetContentRegionAvail().X / 2, default)))

ImGui.PushStyleColor(ImGuiCol.Button, 0xFFA06020);
ImGui.PushStyleColor(ImGuiCol.ButtonActive, 0xDD000000 | 0x005E5BFF);
ImGui.PushStyleColor(ImGuiCol.ButtonHovered, 0xAA000000 | 0x005E5BFF);

if (ImGui.Button("(New Repo) Give me more information! ", new(ImGui.GetContentRegionAvail().X / 2, default)))
{
Service.Configuration.TransitionPopupViewed = true;
ImGui.CloseCurrentPopup();
Util.OpenLink($"https://github.com/InitialDet/AutoHook");
}

ImGui.PopStyleColor(3);
ImGui.SameLine();
if (ImGui.Button("Give me more information!", new(ImGui.GetContentRegionAvail().X, default)))

if (ImGui.Button("Ok, I understand", new(ImGui.GetContentRegionAvail().X, default)))
{
Util.OpenLink($"https://github.com/InitialDet/AutoHook");
Service.Configuration.TransitionPopupViewed = true;
ImGui.CloseCurrentPopup();
}

}
public override void Draw()
{
Expand Down Expand Up @@ -185,6 +206,7 @@ private static unsafe void TestButtons()
{
if (ImGui.Button(@"Check"))
{
Service.Configuration.TransitionPopupViewed = false;
}
}

Expand Down Expand Up @@ -361,6 +383,14 @@ public static class PluginChangeLog
{
public static readonly List<Version> Versions = new()
{
new Version("3.0.4.1")
{
MainChanges =
{
"AutoHook has moved to a new repository",
"Please, install the new version from https://love.puni.sh/ment.json",
}
},
new Version("3.0.4.0")
{
MainChanges =
Expand Down

0 comments on commit 133f8cb

Please sign in to comment.