-
Notifications
You must be signed in to change notification settings - Fork 53
@Figure.add_gui
and append_gui
decorators
#849
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
base: main
Are you sure you want to change the base?
Conversation
I have never seen someone love a decorator more than you lol |
I think this is pretty cool One thing, I'm not sure how I feel about the It seems like a lot of scaffolding just to indicate that the user has interacted with the imgui window...unless I am missing something |
It's useful when you have a lot of UI elements that could have changed and you want to know if any of them have changed. It's cumbersome to write: changed1, val1 = imgui.slider(...)
changed2, val2 = imgui.slider(...)
...
changed_n, valn = imgui.slider(...)
if any([changed1, changed2, ... change_d]):
# recompute
# could also do
if changed1 | changed2 | ... changed_n:
# recompute Basically the following is invalid python syntax otherwise I would just use the changed |, val1 = imgui.slider(...)
changed |, val2 = imgui.slider(...)
...
changed |, val_n = imgui.slider(...) This is valid without tuple unpacking: changed = func()
changed |= func2() |
@Figure.add_gui
and append_gui
decorators
Failures are due to an imgui update |
closes #848