Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

ImGuiCS core discussion #4

Open
0x0ade opened this issue Sep 2, 2017 · 14 comments
Open

ImGuiCS core discussion #4

0x0ade opened this issue Sep 2, 2017 · 14 comments

Comments

@0x0ade
Copy link
Owner

0x0ade commented Sep 2, 2017

Feel free to discuss anything regarding ImGuiCS (the ImGui.NET fork) itself here.

@0x0ade 0x0ade changed the title ImGuiCS core discussion issue ImGuiCS core discussion Sep 2, 2017
@0x0ade 0x0ade added the core label Sep 2, 2017
@fxgenstudio
Copy link

I need "ImGuiColorTextEdit" component, I think I already have my answer but do you have a tool to help C++ to C# conversion ?

https://github.com/BalazsJako/ImGuiColorTextEdit

@0x0ade
Copy link
Owner Author

0x0ade commented Jan 11, 2018

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.

@fxgenstudio
Copy link

Could you update ImguiCS to last Imgui 1.54 ?
Thanks.

@0x0ade
Copy link
Owner Author

0x0ade commented Jan 15, 2018

I'll try to do it this week, but no promises as I'll also have an exam this week.

@fxgenstudio
Copy link

How to do C++ ImGui::GetWindowDrawList()->AddImage(...) in CS ?

@0x0ade
Copy link
Owner Author

0x0ade commented Jan 16, 2018

I've just added the missing AddImage binding to ImDrawList and moved a method to match its native counterpart: 39e0fc5, e8d3930

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.

@fxgenstudio
Copy link

Thanks that work !
I display texture font.

image

@0x0ade
Copy link
Owner Author

0x0ade commented Jan 20, 2018

@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.

@zeaga
Copy link

zeaga commented Mar 23, 2018

Is there any way I can hide the close button of a window?

Related:
ocornut/imgui#1305

@0x0ade
Copy link
Owner Author

0x0ade commented Mar 24, 2018

@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.

@zeaga
Copy link

zeaga commented Mar 24, 2018

Nope, didn't work unfortunately.

@0x0ade
Copy link
Owner Author

0x0ade commented Apr 10, 2018

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.

@fxgenstudio
Copy link

Perfect !

@0x0ade
Copy link
Owner Author

0x0ade commented Apr 20, 2018

The underlying C binding - cimgui - hasn't been updated to ImGui 1.60 just yet: cimgui/cimgui#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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants