|
|
|
@ -4555,89 +4555,6 @@ namespace ImGuiNET |
|
|
|
|
{ |
|
|
|
|
ImGuiNative.igBullet(); |
|
|
|
|
} |
|
|
|
|
public static bool InputText(string label, string buf, uint buf_size) |
|
|
|
|
{ |
|
|
|
|
int label_byteCount = Encoding.UTF8.GetByteCount(label); |
|
|
|
|
byte* native_label = stackalloc byte[label_byteCount + 1]; |
|
|
|
|
fixed (char* label_ptr = label) |
|
|
|
|
{ |
|
|
|
|
int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); |
|
|
|
|
native_label[native_label_offset] = 0; |
|
|
|
|
} |
|
|
|
|
int buf_byteCount = Encoding.UTF8.GetByteCount(buf); |
|
|
|
|
byte* native_buf = stackalloc byte[buf_byteCount + 1]; |
|
|
|
|
fixed (char* buf_ptr = buf) |
|
|
|
|
{ |
|
|
|
|
int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); |
|
|
|
|
native_buf[native_buf_offset] = 0; |
|
|
|
|
} |
|
|
|
|
ImGuiInputTextFlags flags = 0; |
|
|
|
|
ImGuiInputTextCallback callback = null; |
|
|
|
|
void* user_data = null; |
|
|
|
|
byte ret = ImGuiNative.igInputText(native_label, native_buf, buf_size, flags, callback, user_data); |
|
|
|
|
return ret != 0; |
|
|
|
|
} |
|
|
|
|
public static bool InputText(string label, string buf, uint buf_size, ImGuiInputTextFlags flags) |
|
|
|
|
{ |
|
|
|
|
int label_byteCount = Encoding.UTF8.GetByteCount(label); |
|
|
|
|
byte* native_label = stackalloc byte[label_byteCount + 1]; |
|
|
|
|
fixed (char* label_ptr = label) |
|
|
|
|
{ |
|
|
|
|
int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); |
|
|
|
|
native_label[native_label_offset] = 0; |
|
|
|
|
} |
|
|
|
|
int buf_byteCount = Encoding.UTF8.GetByteCount(buf); |
|
|
|
|
byte* native_buf = stackalloc byte[buf_byteCount + 1]; |
|
|
|
|
fixed (char* buf_ptr = buf) |
|
|
|
|
{ |
|
|
|
|
int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); |
|
|
|
|
native_buf[native_buf_offset] = 0; |
|
|
|
|
} |
|
|
|
|
ImGuiInputTextCallback callback = null; |
|
|
|
|
void* user_data = null; |
|
|
|
|
byte ret = ImGuiNative.igInputText(native_label, native_buf, buf_size, flags, callback, user_data); |
|
|
|
|
return ret != 0; |
|
|
|
|
} |
|
|
|
|
public static bool InputText(string label, string buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) |
|
|
|
|
{ |
|
|
|
|
int label_byteCount = Encoding.UTF8.GetByteCount(label); |
|
|
|
|
byte* native_label = stackalloc byte[label_byteCount + 1]; |
|
|
|
|
fixed (char* label_ptr = label) |
|
|
|
|
{ |
|
|
|
|
int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); |
|
|
|
|
native_label[native_label_offset] = 0; |
|
|
|
|
} |
|
|
|
|
int buf_byteCount = Encoding.UTF8.GetByteCount(buf); |
|
|
|
|
byte* native_buf = stackalloc byte[buf_byteCount + 1]; |
|
|
|
|
fixed (char* buf_ptr = buf) |
|
|
|
|
{ |
|
|
|
|
int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); |
|
|
|
|
native_buf[native_buf_offset] = 0; |
|
|
|
|
} |
|
|
|
|
void* user_data = null; |
|
|
|
|
byte ret = ImGuiNative.igInputText(native_label, native_buf, buf_size, flags, callback, user_data); |
|
|
|
|
return ret != 0; |
|
|
|
|
} |
|
|
|
|
public static bool InputText(string label, string buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, IntPtr user_data) |
|
|
|
|
{ |
|
|
|
|
int label_byteCount = Encoding.UTF8.GetByteCount(label); |
|
|
|
|
byte* native_label = stackalloc byte[label_byteCount + 1]; |
|
|
|
|
fixed (char* label_ptr = label) |
|
|
|
|
{ |
|
|
|
|
int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); |
|
|
|
|
native_label[native_label_offset] = 0; |
|
|
|
|
} |
|
|
|
|
int buf_byteCount = Encoding.UTF8.GetByteCount(buf); |
|
|
|
|
byte* native_buf = stackalloc byte[buf_byteCount + 1]; |
|
|
|
|
fixed (char* buf_ptr = buf) |
|
|
|
|
{ |
|
|
|
|
int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); |
|
|
|
|
native_buf[native_buf_offset] = 0; |
|
|
|
|
} |
|
|
|
|
void* native_user_data = (void*)user_data.ToPointer(); |
|
|
|
|
byte ret = ImGuiNative.igInputText(native_label, native_buf, buf_size, flags, callback, native_user_data); |
|
|
|
|
return ret != 0; |
|
|
|
|
} |
|
|
|
|
public static bool InputInt3(string label, ref int v) |
|
|
|
|
{ |
|
|
|
|
int label_byteCount = Encoding.UTF8.GetByteCount(label); |
|
|
|
|