|
|
@ -3465,112 +3465,6 @@ namespace ImGuiNET |
|
|
|
{ |
|
|
|
{ |
|
|
|
ImGuiNative.igEndPopup(); |
|
|
|
ImGuiNative.igEndPopup(); |
|
|
|
} |
|
|
|
} |
|
|
|
public static bool InputTextMultiline(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; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Vector2 size = new Vector2(); |
|
|
|
|
|
|
|
ImGuiInputTextFlags flags = 0; |
|
|
|
|
|
|
|
ImGuiInputTextCallback callback = null; |
|
|
|
|
|
|
|
void* user_data = null; |
|
|
|
|
|
|
|
byte ret = ImGuiNative.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, user_data); |
|
|
|
|
|
|
|
return ret != 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static bool InputTextMultiline(string label, string buf, uint buf_size, Vector2 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.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, user_data); |
|
|
|
|
|
|
|
return ret != 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static bool InputTextMultiline(string label, string buf, uint buf_size, Vector2 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.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, user_data); |
|
|
|
|
|
|
|
return ret != 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static bool InputTextMultiline(string label, string buf, uint buf_size, Vector2 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.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, user_data); |
|
|
|
|
|
|
|
return ret != 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static bool InputTextMultiline(string label, string buf, uint buf_size, Vector2 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.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, native_user_data); |
|
|
|
|
|
|
|
return ret != 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public static bool Selectable(string label) |
|
|
|
public static bool Selectable(string label) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int label_byteCount = Encoding.UTF8.GetByteCount(label); |
|
|
|
int label_byteCount = Encoding.UTF8.GetByteCount(label); |
|
|
|