mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: add Util.OpenLink()
This commit is contained in:
parent
c5237663b8
commit
dd12a284e5
1 changed files with 19 additions and 0 deletions
|
|
@ -247,6 +247,12 @@ namespace Dalamud.Utility
|
|||
ImGui.PopStyleVar();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show a structure in an ImGui context.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the structure.</typeparam>
|
||||
/// <param name="obj">The pointer to the structure.</param>
|
||||
/// <param name="autoExpand">Whether or not this structure should start out expanded.</param>
|
||||
public static unsafe void ShowStruct<T>(T* obj, bool autoExpand = false) where T : unmanaged
|
||||
{
|
||||
ShowStruct(*obj, (ulong)&obj, autoExpand);
|
||||
|
|
@ -433,6 +439,19 @@ namespace Dalamud.Utility
|
|||
return Check1() || Check2() || Check3();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Open a link in the default browser.
|
||||
/// </summary>
|
||||
/// <param name="url">The link to open.</param>
|
||||
public static void OpenLink(string url)
|
||||
{
|
||||
var process = new ProcessStartInfo(url)
|
||||
{
|
||||
UseShellExecute = true
|
||||
};
|
||||
Process.Start(process);
|
||||
}
|
||||
|
||||
private static unsafe void ShowValue(ulong addr, IEnumerable<string> path, Type type, object value)
|
||||
{
|
||||
if (type.IsPointer)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue