-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added IMGUI_USE_WCHAR32 instead of "#define ImWchar ImWchar32" to fac…
- Loading branch information
Showing
5 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
670367e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ocornut
#define IM_UNICODE_CODEPOINT_MAX (sizeof(ImWchar) == 2 ? 0xFFFF : 0x10FFFF)
Could be also moved toSo that this:
would be solved!!
PS: Now there is https://github.com/cimgui/cimgui/tree/internal_funcs with internal function generation which will be merged on master.
Just tested in C building there is only one problemImGuiStorage
is still an incomplete type (the struct is already not defined and we dont use only a pointer to it) when the template typedefs for C are done. I can solve with cutting the ImGuiStorage definition and pasting it before the above typedef but I dont know how to manage it in automatic generation.Do you have any idea?
JUST solved moving ImPool templates typedefs after ImGuiStorage definition
670367e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that actually solves it? you'll still have
(IM_UNICODE_CODEPOINT_MAX+1)/4096/8
as array size, which would appears as(0xFFFF+1)/4096/8
in the preprocessed sources, how are you going to parse that into something storable in the .json file?I worry that this is an endless fragile thing for imgui.h to be adapted to those constraints. Those structures won't often changes so it's ok for cimgui to have custom handling for some. Or have you considering using libclang to parse the C++ code?
670367e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if precompiler will do it, but if it doesnt Lua evaluates
(0xFFFF+1)/4096/8
as2
670367e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but .json doesn't.
Preprocessor will output
(0xFFFF+1)/4096/8
.670367e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using LuaJIT to cook the precompiled source into .json
for example, you will see value and calc_value
670367e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed that change.