Open ocornut opened 4 years ago
First, thanks for ImGui, it's amazing piece of technology, I started using it for a little while and am having genuine fun with it, also repurposed one of it's examples in an in development tool here as agsconfig. ImGui is awesome!
I will update it to use non-hardcoded values. For now the .ash is not used, and instead I am relying on a big string in agsimgui.cpp
. I am manually writing everything because AGS Script doesn't support the &
feature (and, for now, AGS Script also doesn't have pointers for primitive types). I too wanted to rewrite some parts of the API - BeginListBox instead of ListBoxHeader for example.
When I get the API done I will proceed to try to automate it, but this is not trivial too, because parsing C++ code requires using Clang AST as parser. I am already learning Clang AST for a different project though, so eventually can be done. When this is done I can move the project to use git submodules or CMake instead of having a static version of ImGui stored in a directory in the git repository.
Hello Eric,
You can and should use the cimgui
metadata output (lua/json data) to get the enum and function data and then you can automate part of your output. While I believe cimgui is a little poorly written (it doesn't use Clang etc as you suggested) but the output works and so as a back-end creator that's the best thing to use today.
ListBoxHeader()
will be refactored into BeginListBox()
but api will change slightly so I would advise against doing that renaming yourself early because your version likely won't match how it will eventually appear in Dear ImGui's API. I realize I should have been working on this api for a while... maybe I can schedule it for the next version.
Cheers
OK, I read the cimgui repository and it seems doable, I will try later this month and report back. :smile:
Hello,
Suggestion: it feels like the code generating the .ash file could emit the value using the value defined in imgui.h rather than hardcoded power of two:
etc.
This will make the generator code a little less readable. But please note that dear imgui provide no binary forward compatibility and those values are expected to change (and regularly are changing).
Regards.