-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disambiguate functions issues: Ex + varying types #11
Comments
Fixed parsing of certain imgui_internal.h constructs
The bug initially reported is indeed fixed. Looking at the current output, I found what I believe are three issues. Coincidentally the first one is on the same spot as above but it is a different issue. (1)
CIMGUI_API ImU32 ImGui_GetColorU32ImGuiColEx(ImGuiCol idx, float alpha_mul /* = 1.0f */); // retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a 32-bit value suitable for ImDrawList
CIMGUI_API ImU32 ImGui_GetColorU32ImGuiCol(ImGuiCol idx); // Implied alpha_mul = 1.0f
CIMGUI_API ImU32 ImGui_GetColorU32(ImVec4 col); // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
CIMGUI_API ImU32 ImGui_GetColorU32ImU32(ImU32 col); I believe the desired output would be: CIMGUI_API ImU32 ImGui_GetColorU32Ex(ImGuiCol idx, float alpha_mul /* = 1.0f */); // retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a 32-bit value suitable for ImDrawList
CIMGUI_API ImU32 ImGui_GetColorU32(ImGuiCol idx); // Implied alpha_mul = 1.0f
CIMGUI_API ImU32 ImGui_GetColorU32ImVec4(ImVec4 col); // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
CIMGUI_API ImU32 ImGui_GetColorU32ImU32(ImU32 col); (2)
Would turn: CIMGUI_API void ImGui_PushID(const char* str_id); // push string into the ID stack (will hash string).
CIMGUI_API void ImGui_PushIDStr(const char* str_id_begin, const char* str_id_end); // push string into the ID stack (will hash string).
CIMGUI_API ImGuiID ImGui_GetID(const char* str_id); // calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself
CIMGUI_API ImGuiID ImGui_GetIDStr(const char* str_id_begin, const char* str_id_end); into CIMGUI_API void ImGui_PushID(const char* str_id, const char* str_id_end /* = NULL */); // push string into the ID stack (will hash string).
CIMGUI_API ImGuiID ImGui_GetID(const char* str_id, const char* str_id_end /* = NULL */); // calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself (3)
Would turn: CIMGUI_API bool ImGui_CheckboxFlags(const char* label, int* flags, int flags_value);
CIMGUI_API bool ImGui_CheckboxFlagsIntPtr(const char* label, unsigned int* flags, unsigned int flags_value); into: CIMGUI_API bool ImGui_CheckboxFlagsIntPtr(const char* label, int* flags, int flags_value);
CIMGUI_API bool ImGui_CheckboxFlagsUIntPtr(const char* label, unsigned int* flags, unsigned int flags_value); Note the function just below, rightfully using CIMGUI_API bool ImGui_RadioButton(const char* label, bool active); // use with e.g. if (RadioButton("one", my_value==1)) { my_value = 1; }
CIMGUI_API bool ImGui_RadioButtonIntPtr(const char* label, int* v, int v_button); // shortcut to handle the above pattern when value is an integer |
So with regards to the above:
My gut feel (which may be very wrong) is that the vast majority of
|
Thanks for the update!
You are completely right. Disregard for now. It should be separate function (the name is a bit odd but not too bad). It however reminds me of some the discussions in #19, I'll open an issue about that (not urgent but worth remembering). |
I've initially seen this pattern in the ImGui_ValueXXX functions but thought it wouldn't be bad to remove those either way so brushed it aside. Then I noticed the same issue in other place:
The bug is:
ImGui_GetColorU32Ex()
is theEx
ofImGui_GetColorU32ImGuiCol()
, not theEx
ofImGui_GetColorU32
.Same here:
Would running one modifier before the other fix it?
The text was updated successfully, but these errors were encountered: