Open 0x0ade opened 7 years ago
I need "ImGuiColorTextEdit" component, I think I already have my answer but do you have a tool to help C++ to C# conversion ?
Unfortunately no. I've attempted something similar by converting imguifilesystem with the replace function step by step and then fixing it by hand, but never finished fixing it completely.
I wish C# had an easy way to interop with C++ libraries, as it'd make using existing ImGui components so much easier.
Could you update ImguiCS to last Imgui 1.54 ? Thanks.
I'll try to do it this week, but no promises as I'll also have an exam this week.
How to do C++ ImGui::GetWindowDrawList()->AddImage(...) in CS ?
I've just added the missing AddImage
binding to ImDrawList
and moved a method to match its native counterpart: https://github.com/0x0ade/ImGuiCS/commit/39e0fc50473fe8c2358b4b175005de5503db4f7b, https://github.com/0x0ade/ImGuiCS/commit/e8d3930d7155af0ab8c8692afb403d047ccedf61
ImGui::GetWindowDrawList()->AddImage(...)
becomes
ImGui.GetWindowDrawList().AddImage(...)
In XNA and FNA, you need to register your texture to the ImGuiXNAState. The Register
method returns the ID you need to use.
Note that I haven't had time to test this yet. Please tell me if this does or doesn't work.
Thanks that work ! I display texture font.
@procfxgen I'll attempt to update the bindings to 1.54 after cimgui 1.54 drops, which should happen shortly after ImGUI 1.54 itself gets released.
Please note that I can only build cimgui 1.54 for Windows x64 and Linux x64. We'll need to wait until someone builds cimgui 1.54 binaries for macOS x64 and all x86 variants.
Is there any way I can hide the close button of a window?
@zeaga It should be possible by doing this:
bool opened = false;
ImGui.Begin("Window Title", ref opened /*, ...*/);
Please tell me if this works or not, I currently can't test it.
Nope, didn't work unfortunately.
ImGUI 1.60 has finally been released: https://twitter.com/ocornut/status/982759513672634374
Unfortunately I'm busy with other projects right now, which means that I'm (hopefully) going to update ImGuiCS later this month.
Perfect !
The underlying C binding - cimgui - hasn't been updated to ImGui 1.60 just yet: https://github.com/Extrawurst/cimgui/issues/49
ImGuiCS and ImGui.NET rely on cimgui, as C# can't natively (without using helpers) interop with C++ in a cross-platform manner.
I'll update ImGuiCS after cimgui's master branch supports 1.60.
Feel free to discuss anything regarding ImGuiCS (the ImGui.NET fork) itself here.