diff --git a/Dalamud/Utility/Util.cs b/Dalamud/Utility/Util.cs index 1013e0aad..447a51f7a 100644 --- a/Dalamud/Utility/Util.cs +++ b/Dalamud/Utility/Util.cs @@ -247,6 +247,12 @@ namespace Dalamud.Utility ImGui.PopStyleVar(); } + /// + /// Show a structure in an ImGui context. + /// + /// The type of the structure. + /// The pointer to the structure. + /// Whether or not this structure should start out expanded. public static unsafe void ShowStruct(T* obj, bool autoExpand = false) where T : unmanaged { ShowStruct(*obj, (ulong)&obj, autoExpand); @@ -433,6 +439,19 @@ namespace Dalamud.Utility return Check1() || Check2() || Check3(); } + /// + /// Open a link in the default browser. + /// + /// The link to open. + public static void OpenLink(string url) + { + var process = new ProcessStartInfo(url) + { + UseShellExecute = true + }; + Process.Start(process); + } + private static unsafe void ShowValue(ulong addr, IEnumerable path, Type type, object value) { if (type.IsPointer)