feat: show error message if font doesn't exist

This commit is contained in:
goat 2021-04-17 03:26:51 +02:00
parent f81a368ed6
commit 6d891ff416
No known key found for this signature in database
GPG key ID: F18F057873895461
2 changed files with 26 additions and 0 deletions

View file

@ -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);
}
}
}