You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe return values should be inverted, cases like: status, floatValue = imgui.SliderFloat("SliderFloat", floatValue, 0.0, 1.0);
Would be much more efficient as: floatValue, status = imgui.SliderFloat("SliderFloat", floatValue, 0.0, 1.0);
Since status (= was the field modified) is rarely used.
So in the vast majority of use people would just do: floatValue = imgui.SliderFloat("SliderFloat", floatValue, 0.0, 1.0);
It would be faster and easier for users. Perhaps add an option in the generator for retro-compatibility and make both available?
(Extra: Curious if the default bindings will be regenerated for latest?)
Thanks,
Omar
The text was updated successfully, but these errors were encountered:
ocornut
changed the title
Return values ordering
Multiple return values ordering
Feb 13, 2018
Hello,
I believe return values should be inverted, cases like:
status, floatValue = imgui.SliderFloat("SliderFloat", floatValue, 0.0, 1.0);
Would be much more efficient as:
floatValue, status = imgui.SliderFloat("SliderFloat", floatValue, 0.0, 1.0);
Since
status
(= was the field modified) is rarely used.So in the vast majority of use people would just do:
floatValue = imgui.SliderFloat("SliderFloat", floatValue, 0.0, 1.0);
It would be faster and easier for users. Perhaps add an option in the generator for retro-compatibility and make both available?
(Extra: Curious if the default bindings will be regenerated for latest?)
Thanks,
Omar
The text was updated successfully, but these errors were encountered: