BallAerospace / COSMOS

Ball Aerospace COSMOS
https://ballaerospace.github.io/cosmos-website/
Other
360 stars 127 forks source link

User Definable Radio Buttons #1788

Open ACaicedoBall opened 1 year ago

ACaicedoBall commented 1 year ago

The current C4 paradigm means for a few mutually exclusive boolean questions we have to bug the user with sequential y/n or T/F popups. it would be nice (if possible) to create 1 window, with N user defined radio button groups that are mutually exclusive. i.e. in a group of two if you select 1 its ok, it you select the other as well the first one deselects. a window like the below.

This is doable in multiple GUI frameworks or HTML 5 if IIRC will be the C6 front end. I think it'd be possible to take either a predefined struct type input, or allow varied inputs (maybe comma separated strings, not elegant but it would be straight fwd). slap a string split on ',' and loop some HTML/JS code in there to create the below. Maybe return an index of what was chosen, or the string repr of it.

<_form> < title > My special input box for 0 to Num_groups for 0 to Num_Inputs <_input type="radio" name="GrpName1" value="value1"> Value1 end end <_/form> _____________________________________ | < my special Title here> | | do you like green [x] yes [ ] no | | do you like eggs [ ]yes [x] no | | do you like ham [x]yes [ ] no | _____________________________________ another option would be to allow us to add in hooks for JS, like create an interface class we can extend so we can create our own pop ups / functions and take the returns that way. whichever. be kind, rewind Ale