Fix ImGuiTextFilter function types

This commit is contained in:
Soreepeong 2025-08-08 12:08:39 +09:00
parent 3e2a6ec9cb
commit 5d8e4bee92
2 changed files with 12 additions and 9 deletions

View file

@ -204,11 +204,14 @@ public static unsafe partial class ImGui
text.Dispose();
}
public static void PassFilter(ImGuiTextFilterPtr self, ImU8String text)
public static bool PassFilter(ImGuiTextFilterPtr self, ImU8String text)
{
fixed (byte* textPtr = text)
ImGuiNative.PassFilter(self.Handle, textPtr, textPtr + text.Length);
text.Dispose();
{
var r = ImGuiNative.PassFilter(self.Handle, textPtr, textPtr + text.Length) != 0;
text.Dispose();
return r;
}
}
public static void RenderText(

View file

@ -2,21 +2,21 @@ namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiTextFilter
{
public void Draw(ImU8String label = default, float width = 0.0f)
public bool Draw(ImU8String label = default, float width = 0.0f)
{
fixed (ImGuiTextFilter* thisPtr = &this)
ImGui.Draw(thisPtr, label, width);
return ImGui.Draw(thisPtr, label, width);
}
public void PassFilter(ImU8String text)
public bool PassFilter(ImU8String text)
{
fixed (ImGuiTextFilter* thisPtr = &this)
ImGui.PassFilter(thisPtr, text);
return ImGui.PassFilter(thisPtr, text);
}
}
public partial struct ImGuiTextFilterPtr
{
public void Draw(ImU8String label = default, float width = 0.0f) => ImGui.Draw(this, label, width);
public void PassFilter(ImU8String text) => ImGui.PassFilter(this, text);
public bool Draw(ImU8String label = default, float width = 0.0f) => ImGui.Draw(this, label, width);
public bool PassFilter(ImU8String text) => ImGui.PassFilter(this, text);
}