Skip to content
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

Order of *Ex() functions #23

Open
ocornut opened this issue Sep 12, 2022 · 1 comment
Open

Order of *Ex() functions #23

ocornut opened this issue Sep 12, 2022 · 1 comment

Comments

@ocornut
Copy link
Member

ocornut commented Sep 12, 2022

I feel the cimgui.h file would be easier to consume if non-Ex function where placed before the Ex functions.

In mod_generate_default_argument_functions.py I tried to replace the final statement function.parent.insert_after_child(function, [new_function]) with function.parent.insert_before_child(function, [new_function]) but comments above the function ends up in the wrong location:

CIMGUI_API bool ImGui_Button(const char* label);                                                              // Implied size = ImVec2(0, 0)
// Widgets: Main
// - Most widgets return true when the value has been changed or when pressed/selected
// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
CIMGUI_API bool ImGui_ButtonEx(const char* label, ImVec2 size /* = ImVec2(0, 0) */);                          // button

May be simple to fix, creating an issue so we don't forget.

ShironekoBen added a commit that referenced this issue Sep 19, 2022
… will not get default helpers generated (#24)

Changed order of Ex functions relative to the original (#23)
@ShironekoBen
Copy link
Collaborator

I've changed the ordering so that it puts non-Ex functions first - you change was entirely correct but just needed a couple more lines to move the attached comments onto the "other" function so that they stayed at the top of the block.

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

No branches or pull requests

2 participants