mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +01:00
Use custom GetPinnableReference instead of deferring it to Span (#2345)
This commit is contained in:
parent
2cd5c5bc68
commit
3e40cad063
9 changed files with 107 additions and 52 deletions
|
|
@ -3,6 +3,7 @@ namespace Dalamud.Bindings.ImGui;
|
|||
public unsafe partial struct ImGuiInputTextCallbackData
|
||||
{
|
||||
public readonly Span<byte> BufSpan => new(this.Buf, this.BufSize);
|
||||
|
||||
public readonly Span<byte> BufTextSpan => new(this.Buf, this.BufTextLen);
|
||||
|
||||
public void InsertChars(int pos, ImU8String text)
|
||||
|
|
@ -15,6 +16,7 @@ public unsafe partial struct ImGuiInputTextCallbackData
|
|||
public unsafe partial struct ImGuiInputTextCallbackDataPtr
|
||||
{
|
||||
public readonly Span<byte> BufSpan => this.Handle->BufSpan;
|
||||
|
||||
public readonly Span<byte> BufTextSpan => this.Handle->BufTextSpan;
|
||||
|
||||
public void InsertChars(int pos, ImU8String text) => ImGui.InsertChars(this, pos, text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue