mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
Magic the magic happen
This commit is contained in:
parent
84769ae5b7
commit
658eedca37
188 changed files with 10329 additions and 3549 deletions
|
|
@ -161,8 +161,8 @@ namespace Dalamud
|
|||
public static void Fatal(string message, string caption)
|
||||
{
|
||||
var flags = NativeFunctions.MessageBoxType.Ok | NativeFunctions.MessageBoxType.IconError;
|
||||
_ = NativeFunctions.MessageBoxW(Process.GetCurrentProcess().MainWindowHandle, message, caption, flags);
|
||||
|
||||
NativeFunctions.MessageBox(Process.GetCurrentProcess().MainWindowHandle, message, caption, flags);
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
|
||||
|
|
@ -196,5 +196,13 @@ namespace Dalamud
|
|||
|
||||
// TODO: Someone implement GetUTF8String with some IntPtr overloads.
|
||||
// while(Marshal.ReadByte(0, sz) != 0) { sz++; }
|
||||
|
||||
/// <summary>
|
||||
/// An extension method to chain usage of string.Format.
|
||||
/// </summary>
|
||||
/// <param name="format">Format string.</param>
|
||||
/// <param name="args">Format arguments.</param>
|
||||
/// <returns>Formatted string.</returns>
|
||||
public static string Format(this string format, params object[] args) => string.Format(format, args);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue