add_input_intx
and add_input_floatx
always return value list of length 4 even when size < 4
#1384
west-rynes
started this conversation in
Contributing
Replies: 1 comment
-
Yeah, I'm not sure if I like the design decision here but the thought process was so that 2,3, and 4 component widgets could share the same value when using the source keyword. It allowed more flexibility but you are right that the returned 4-component value is odd when using a 2 or 3 component widget. We could change this is 2.0. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version of Dear PyGui
Version: 1.0.2
Operating System: macOS 10.15.7
My Issue
add_input_intx
andadd_input_floatx
always return value list of length 4 even when size < 4Expected behavior
When getting the value using
dpg.get_value
I think the user would usually expect to get a list length equal to the size of the widget. Getting a list size always == 4 may be unexpected.Nonetheless, I really like these generalized widgets. Nice work!
Standalone, minimal, complete and verifiable example
Output shows a list of 4 is always returned no matter the size.
Beta Was this translation helpful? Give feedback.
All reactions