mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
feat: show error message if font doesn't exist
This commit is contained in:
parent
f81a368ed6
commit
6d891ff416
2 changed files with 26 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
|
@ -146,5 +147,14 @@ namespace Dalamud
|
|||
ImGui.TextColored(ImGuiColors.HealerGreen, $" {fieldInfo.Name}: {fieldInfo.GetValue(obj)}");
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet= CharSet.Auto)]
|
||||
public static extern int MessageBox(IntPtr hWnd, string text, string caption, uint type);
|
||||
|
||||
public static void Fatal(string message, string caption)
|
||||
{
|
||||
MessageBox(Process.GetCurrentProcess().MainWindowHandle, message, caption, 0);
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue