Conversation
This is an update to the user.prompt.
It allows up to 3 optional buttons to be displayed.
The button text is returned when clicked.
A typical example.
sAnswewr = user.prompt('Is the LED on?',text_input=False,button_1_text="Yes",button_2_text="No",button_3_text="Cancel")
Will ask the question 'Is the LED on?' and the user can click "Yes", "No" or "Cancel"
|
Hi there, I'm interested in more versatile user inputs as well Using a jsonschema form description would support more use cases, including this one. That work has already been done in the spintop-openhtf distribution, that seems not to be under active development anymore Their implementation however has the caveats of not being api-compatible with the current UserInput plug, and breaking the console I/O, so maybe integrate as a FormInputPlug instead Frontend: Backend: |
This is an update to the user.prompt.
It allows up to 3 optional buttons to be displayed. The button text is returned when clicked.
A typical example.
sAnswewr = user.prompt('Is the LED on?',text_input=False,button_1_text="Yes",button_2_text="No",button_3_text="Cancel") Will ask the question 'Is the LED on?' and the user can click "Yes", "No" or "Cancel"
This change is