From 0ebceba9d2131f5b29ea483a7ae84cc2df9aeaf2 Mon Sep 17 00:00:00 2001 From: ditzy Date: Tue, 21 Nov 2023 16:26:34 -0600 Subject: [PATCH] save --- ScoutHelper/Images/toggle-body-active.png | Bin 0 -> 1191 bytes ScoutHelper/Images/toggle-body-inactive.png | Bin 0 -> 1192 bytes ScoutHelper/Images/toggle-cap-active.png | Bin 0 -> 4327 bytes ScoutHelper/Images/toggle-cap-inactive.png | Bin 0 -> 5666 bytes ScoutHelper/Plugin.cs | 2 +- ScoutHelper/ScoutHelper.csproj | 16 +++++++++++ ScoutHelper/Utils.cs | 29 ++++++++++++++------ ScoutHelper/Windows/MainWindow.cs | 5 ++++ ScoutHelper/Windows/ToggleButton.cs | 23 ++++++++++++++++ 9 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 ScoutHelper/Images/toggle-body-active.png create mode 100644 ScoutHelper/Images/toggle-body-inactive.png create mode 100644 ScoutHelper/Images/toggle-cap-active.png create mode 100644 ScoutHelper/Images/toggle-cap-inactive.png create mode 100644 ScoutHelper/Windows/ToggleButton.cs diff --git a/ScoutHelper/Images/toggle-body-active.png b/ScoutHelper/Images/toggle-body-active.png new file mode 100644 index 0000000000000000000000000000000000000000..7b3a500725cc2291c8a0fa8956605bab8c9f45cb GIT binary patch literal 1191 zcmV;Y1X%ltP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3ssjvFBihW~Sl9sz%0a~y^bsW<5H`!dNS+1*H8 zwZ)p4IK~)1W|HQwpDX>?BQz&9k5Ws?7+SS*!zA)^%)72RuRT{hbhpvNi_(W5^x;4s z?AMH;1zK*#$9}Q{$;*QB(Dcqu_Q@`fZTLe*aRp+?i~Tt8{dL6iS!=|?nbY>xrUmsW z_d{JrIcIP@aArA|6^P?8%>9%KiQIBeq(tvuymdxu<|1pI`^&TcAWwn4}vEXf)Q4nlCH_W%G*F|^<5&u z>FM4U$cuNuk;W#sKj8%+w5~p~v%r^p9sr9V3a?$}zyVu6ZXph%XKzV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@g@#b%mE-J~|&DJzwINf;quICp3kQJrg zPo&@!;FzC^44&Ipm})(s2$b2{W|Eb)czUmFIwqC_VB}$J%pdT4ArL1P#pyJj+t--d zb5J=CPFCz7wz~uOXE(9MqWJ-skB9ipfZyu}vIkbS_ynFiSBX8|f#GzinX>&E&@@~R z`VdBX>j3ld5c@C?@a_g8S%_GaqMpmlG<;o&2{fIV`c@{MIEs)4&M*7d1){IfFN=M_ z3%WMf4rDWso|vZi>W9pgmXoaBwM4|m8}||2e~h#*fIc&Yed^)LqI*4V3WY+hqC(>w zg5$Y;Q@cAEey)o-Uts0K$XFEjy&JgudvS~m;20Z3k58Z_XE*l2qA61KE1)a4!*IG7 zd-?~Acb?dA!O}NiD@Vs-e+!g(?jgjHg(bR>F$?>yQ}VC(5t%f}%37p-eP2#CCHBJM zs<1A23wUB#Qr$+psh!ETL&U>-FkctE-8>Pm~8_JY$=a>|@H9vOi7Y6(~F zH3TOG;_&}Z;KU;ZFkg@F3YKT=S_eXFl2S(IKi`W|kUqfkKf!4(zUcSp=l}o!07*qo IM6N<$f}Vl?9RL6T literal 0 HcmV?d00001 diff --git a/ScoutHelper/Plugin.cs b/ScoutHelper/Plugin.cs index 8fb42a2..064a9e1 100644 --- a/ScoutHelper/Plugin.cs +++ b/ScoutHelper/Plugin.cs @@ -44,7 +44,7 @@ public Plugin() { Conf.Initialize(PluginInterface); HuntHelperManager = new HuntHelperManager(); - BearManager = new BearManager(Utils.DataFilePath("Bear.json")); + BearManager = new BearManager(Utils.PluginFilePath(@"Data\Bear.json")); ConfigWindow = new ConfigWindow(); MainWindow = new MainWindow(HuntHelperManager, BearManager); diff --git a/ScoutHelper/ScoutHelper.csproj b/ScoutHelper/ScoutHelper.csproj index 23431ad..c4e7969 100644 --- a/ScoutHelper/ScoutHelper.csproj +++ b/ScoutHelper/ScoutHelper.csproj @@ -16,6 +16,22 @@ ResXFileCodeGenerator Strings.Designer.cs + + + PreserveNewest + + + + PreserveNewest + + + + PreserveNewest + + + + PreserveNewest + diff --git a/ScoutHelper/Utils.cs b/ScoutHelper/Utils.cs index 663c735..41d15df 100644 --- a/ScoutHelper/Utils.cs +++ b/ScoutHelper/Utils.cs @@ -1,25 +1,26 @@ -using Dalamud.Plugin.Services; -using ImGuiNET; -using System; +using System; using System.Collections.Generic; using System.Collections.Immutable; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; +using Dalamud.Plugin.Services; +using FFXIVClientStructs.FFXIV.Common.Math; +using ImGuiNET; using ScoutHelper.Models; namespace ScoutHelper; public static class Utils { - public static string WorldName => Plugin.ClientState.LocalPlayer?.CurrentWorld?.GameData?.Name.ToString() ?? "Not Found"; + public static string WorldName => + Plugin.ClientState.LocalPlayer?.CurrentWorld?.GameData?.Name.ToString() ?? "Not Found"; - public static string DataFilePath(string dataFilename) => Path.Combine( + public static string PluginFilePath(string dataFilename) => Path.Combine( Plugin.PluginInterface.AssemblyLocation.Directory?.FullName!, - "Data", dataFilename ); - + public static void CreateTooltip(string text, float width = 12f) { ImGui.BeginTooltip(); ImGui.PushTextWrapPos(ImGui.GetFontSize() * width); @@ -28,8 +29,9 @@ public static void CreateTooltip(string text, float width = 12f) { ImGui.EndTooltip(); } + public static Vector2 V2(float x, float y) => new(x, y); + public static string FormatTemplate(string textTemplate, IList trainList, string bear, string url) { - var regex = new Regex(@"\\?\{[^}]+\\?\}", RegexOptions.Compiled | RegexOptions.IgnoreCase); var matches = regex.Matches(textTemplate); @@ -37,6 +39,11 @@ public static string FormatTemplate(string textTemplate, IList trainLi return textTemplate; } + var variables = new Dictionary() { + { "#", trainList.Count.ToString() }, + { "#available", trainList.Count.ToString() }, + }.AsReadOnly(); + var s = new StringBuilder(textTemplate.Length); var i = 0; foreach (Match match in matches) { @@ -56,6 +63,7 @@ public static string FormatTemplate(string textTemplate, IList trainLi } #region extensions + public static void TaggedPrint(this IChatGui chatGui, string message) { chatGui.Print(message, Plugin.Name); } @@ -64,12 +72,15 @@ public static void TaggedPrintError(this IChatGui chatGui, string message) { chatGui.PrintError(message, Plugin.Name); } - public static IReadOnlyDictionary VerifyEnumDictionary(this IDictionary enumDict) where K : struct, Enum { + public static IReadOnlyDictionary VerifyEnumDictionary(this IDictionary enumDict) + where K : struct, Enum { var allEnumsAreInDict = (Enum.GetValuesAsUnderlyingType() as K[])!.All(enumDict.ContainsKey); if (!allEnumsAreInDict) { throw new Exception($"All values of enum [{typeof(K).Name}] must be in the dictionary."); } + return enumDict.ToImmutableDictionary(); } + #endregion } diff --git a/ScoutHelper/Windows/MainWindow.cs b/ScoutHelper/Windows/MainWindow.cs index a7e790f..da2d0b3 100644 --- a/ScoutHelper/Windows/MainWindow.cs +++ b/ScoutHelper/Windows/MainWindow.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Linq; using System.Numerics; +using Dalamud.Interface.Utility.Raii; namespace ScoutHelper.Windows; @@ -74,6 +75,8 @@ private unsafe void DrawModeButtons() { var modeLinkColor = modeLink ? activeColor : inactiveColor; var modeFullColor = modeFull ? activeColor : inactiveColor; + using var rounding = ImRaii.PushStyle(ImGuiStyleVar.FrameRounding, 0f); + ImGui.PushStyleColor(ImGuiCol.Button, modeLinkColor); ImGui.PushStyleColor(ImGuiCol.ButtonHovered, modeLinkColor); ImGui.PushStyleColor(ImGuiCol.ButtonActive, modeLinkColor*0.9f); @@ -92,6 +95,8 @@ private unsafe void DrawModeButtons() { _copyFormattedText = !_copyFormattedText; } ImGui.PopStyleColor(3); + + ToggleButton.Draw(_buttonSize); } private void DrawGeneratorButtons() { diff --git a/ScoutHelper/Windows/ToggleButton.cs b/ScoutHelper/Windows/ToggleButton.cs new file mode 100644 index 0000000..80b3c61 --- /dev/null +++ b/ScoutHelper/Windows/ToggleButton.cs @@ -0,0 +1,23 @@ +using System.Numerics; +using Dalamud.Interface.Internal; +using ImGuiNET; + +namespace ScoutHelper.Windows; + +public static class ToggleButton { + + private static IDalamudTextureWrap _imCapActive = + Plugin.PluginInterface.UiBuilder.LoadImage(Utils.PluginFilePath(@"Images\toggle-cap-active")); + private static IDalamudTextureWrap _imCapInactive = + Plugin.PluginInterface.UiBuilder.LoadImage(Utils.PluginFilePath(@"Images\toggle-cap-inactive")); + private static IDalamudTextureWrap _imBodyActive = + Plugin.PluginInterface.UiBuilder.LoadImage(Utils.PluginFilePath(@"Images\toggle-body-active")); + private static IDalamudTextureWrap _imBodyInactive = + Plugin.PluginInterface.UiBuilder.LoadImage(Utils.PluginFilePath(@"Images\toggle-body-inactive")); + + public static void Draw(Vector2 size) { + + ImGui.InvisibleButton("abc", size); + ImGui.Image(_imCapActive.ImGuiHandle, new Vector2(size.Y/2, size.Y)); + } +}