Conversation
akaszynski
left a comment
There was a problem hiding this comment.
Excellent, I agree with the implementation. We will want to add tests for this once we’ve figured out how to get interactive callbacks working.
|
I can add it to the tests at least for coverage then |
tests/test_widgets.py
Outdated
| func = lambda value: value # Does nothing | ||
| p.add_mesh(mesh) | ||
| p.add_checkbox_button_widget(callback=func) | ||
| p.clear_button_widgets() |
There was a problem hiding this comment.
Let's remove this line. The clear method should be called on close and if not, it will segfault resulting in a failed test
There was a problem hiding this comment.
I removed it but I think the same is done in all the other tests. In this case we should correct this
There was a problem hiding this comment.
ah yep, i totally missed that all the other tests are doing that. we should fix those too
|
I'll go ahead and merge this then I'll open a follow-up PR to fix the tests as suggested in #528 (comment). |
This PR adds basic support for checkbox button. The
Animatelabel below is not part of the button but is given byadd_text()instead.To illustrate (inspired by Orbiting):
Source code: https://gist.github.com/GuillaumeFavelier/1bfa7ad2160d86b0814ed890dd7f27bc
I think this demo could be improved with floors or background image.