mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
15 lines
438 B
C#
15 lines
438 B
C#
namespace Brutal.ImGuiApi;
|
|
|
|
public class ImException(string message) : Exception(message);
|
|
|
|
public partial class ImGui
|
|
{
|
|
/// <summary>
|
|
/// This is an equivalent of the IM_ASSERT C++ macro, intended for similar validation in ported code.
|
|
/// </summary>
|
|
public static void Assert(bool condition, string? message = null)
|
|
{
|
|
if (!condition)
|
|
throw new ImException(message ?? "Assertion failed");
|
|
}
|
|
}
|