Open PrimeraTech opened 7 months ago
I have been trying by trial and error to get C# to be happy with my syntax for ImGui.InputText ().
Can anyone provide a single example that will compile and work?
The function prototype is: public static bool InputText(string label, char* buf, UIntPtr buf_size, ImGuiInputTextFlags flags = (ImGuiInputTextFlags)(0), ImGuiInputTextCallback callback = null, IntPtr user_data = default)
How is a char * variable defined in c# to be compatible with the second parameter?
The following code compiles but does not work:
string foo = "this is a test"; unsafe { ImGui.InputText("xx", (char*)&foo, new UIntPtr(10)); }
I have been trying by trial and error to get C# to be happy with my syntax for ImGui.InputText ().
Can anyone provide a single example that will compile and work?
The function prototype is: public static bool InputText(string label, char* buf, UIntPtr buf_size, ImGuiInputTextFlags flags = (ImGuiInputTextFlags)(0), ImGuiInputTextCallback callback = null, IntPtr user_data = default)
How is a char * variable defined in c# to be compatible with the second parameter?