dearimgui / dear_bindings

C header (and language binding metadata) generator for Dear ImGui
MIT License
221 stars 12 forks source link

Disambiguate IsRectVisible() variants #25

Closed ocornut closed 1 year ago

ocornut commented 1 year ago

Again, small issue but right now I can't seem to find how to proceed. May be trivial:

Current output:

CIMGUI_API bool ImGui_IsRectVisible(ImVec2 size);                             // test if rectangle (of given size, starting from cursor position) is visible / not clipped.
CIMGUI_API bool ImGui_IsRectVisibleImVec2(ImVec2 rect_min, ImVec2 rect_max);  // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.

it's an odd situation in the public API (and probably not a good API to be honest) but ideally in cimgui it would be:

CIMGUI_API bool  ImGui_IsRectVisibleBySize(ImVec2 size);                 // test if rectangle (of given size, starting from cursor position) is visible / not clipped.
CIMGUI_API bool  ImGui_IsRectVisible(ImVec2 rect_min, ImVec2 rect_max);  // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
ShironekoBen commented 1 year ago

OK, I've added some special-case renaming rules to do that.

ocornut commented 1 year ago

Looks good, thank you!