-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add disable methods (and update to imgui 1.84.2) #519
Conversation
Letting thom know to check if they have time. I do hilariously have the same feeling actually on negative bools -- I often write |
Previously if you checked out a different rev of imgui submodule, this would be clobbered With this change, you can checkout any revision of imgui, run bindgen, build, test, then commit change to the submodule The autofix is still available via 'cargo task modfix'
Changes required: - Overloaded methods named slightly differently (e.g sys::igPlotHistogramFloatPtr to sys::igPlotHistogram_FloatPtr) - ImGuiNavInput_KeyMenu_ was removed upstream, so NavInput::INTERNAL_COUNT needed tweaked
Also change oddly-specific test to avoid having to change it every update
Updated sans |
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.
lgtm
thank you dbr! |
Oh just realized the CHANGELOG needs updated to mention 1.84.2 (currently it only mentions the previous update to 1.82) |
@dbr good memory. will add this to the tracking issue so I don't forget, but I'll be doing over the entire changelog/readme fairly extensively before release. |
Most of the interesting change is in the last commit b24b726 - rest is fairly mechanical updating to latest imgui upstream.
Although it's worth noting I did change how
cargo xtask bindgen
works, so it doesn't callcargo xtask fixmod
- which @thomcc may have some opinion on? (although we should either keep this change, or change thedocs/upgrading-imgui.md
doc as the two contradict each other)For the interesting part, there is token and closure based methods to disable widgets.
I think the only bit of some contention might be: I have an
irrationalrational dislike of double-/triple-negative boolean logic in code (e.gdisabled(!false)
then introduce alet not_enabled = ...
😢 ), thus I've included bothenabled
anddisabled
methods (similar to Qt'ssetEnabled(...)
andsetDisabled(...)
). Arguably a little redundant, but I think it's worthwhile to include to improve easy-of-reading