Merge pull request #2315 from Haselnussbomber/imgui-bindings-fixes

[imgui-bindings] Fixes and removals
This commit is contained in:
goat 2025-07-17 02:08:49 +02:00 committed by GitHub
commit 6efbb71790
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 41 additions and 145 deletions

View file

@ -634,25 +634,11 @@ public static partial class ImGuiHelpers
.ToArray();
/// <summary>
/// Determines whether <paramref name="ptr"/> is empty.
/// Determines whether <paramref name="ptr"/> is not empty and loaded.
/// </summary>
/// <param name="ptr">The pointer.</param>
/// <returns>Whether it is empty.</returns>
public static unsafe bool IsNull(this ImFontPtr ptr) => ptr.Handle == null;
/// <summary>
/// Determines whether <paramref name="ptr"/> is empty.
/// </summary>
/// <param name="ptr">The pointer.</param>
/// <returns>Whether it is empty.</returns>
public static unsafe bool IsNotNullAndLoaded(this ImFontPtr ptr) => ptr.Handle != null && ptr.IsLoaded();
/// <summary>
/// Determines whether <paramref name="ptr"/> is empty.
/// </summary>
/// <param name="ptr">The pointer.</param>
/// <returns>Whether it is empty.</returns>
public static unsafe bool IsNull(this ImFontAtlasPtr ptr) => ptr.Handle == null;
/// <returns>Whether it is not null and loaded.</returns>
public static unsafe bool IsNotNullAndLoaded(this ImFontPtr ptr) => !ptr.IsNull && ptr.IsLoaded();
/// <summary>
/// If <paramref name="self"/> is default, then returns <paramref name="other"/>.
@ -661,7 +647,7 @@ public static partial class ImGuiHelpers
/// <param name="other">The other.</param>
/// <returns><paramref name="self"/> if it is not default; otherwise, <paramref name="other"/>.</returns>
public static unsafe ImFontPtr OrElse(this ImFontPtr self, ImFontPtr other) =>
self.Handle is null ? other : self;
self.IsNull ? other : self;
/// <summary>
/// Mark 4K page as used, after adding a codepoint to a font.