-
Notifications
You must be signed in to change notification settings - Fork 53
more imgui stuff! #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?
more imgui stuff! #849
Conversation
if imgui.button("reset data"): | ||
fig_local[0, 0].graphics[0].data[:, 1] = np.random.rand(100) |
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.
I think this needs to be "new data" instead of "reset data"
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.
Would make it more informative for what the button actually does
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() |
closes #848, closes #847