implemented short menu system too
This commit is contained in:
@@ -56,9 +56,13 @@ Exported functions:
|
||||
|
||||
### `deck.menu`
|
||||
|
||||
A library for easy menu systems for T-DeckARD programs. Allows displaying up to 10 menu items with the ability to select them with a single digit or a key on the `QWERTYUIOP` keyboard row.
|
||||
A library for easy menu systems for T-DeckARD programs.
|
||||
|
||||
Exports the only function, `menu(choices)`, which accepts a list of **tuples**, each in the format `(id, label)`. The `label` field is what's displayed on the screen, the `id` field is the string that gets returned upon selection. If the user selects `c`, the operation is canceled and an empty `id` string is returned.
|
||||
Exported functions:
|
||||
|
||||
- `confirm(msg, yes='y', no='n', alt_prompt=None)`: prompt for yes/no confirmation, using a standard prompt in `msg` and the `yes`/`no` message in the corresponding parameters, or a completely alternative prompt in `alt_prompt`.Returns True or False as the result.
|
||||
- `shortmenu(choices, suffix=': ')`: display several menu items from the `choices` list, automatically labeling the first fitting letter from the item as the selection shortcut. Returns a tuple (`result`, `label`), or (``,``) in case the selection doesn't match.
|
||||
- `menu(choices)`: display up to 10 menu items with the ability to select them with a single digit or a key on the `QWERTYUIOP` keyboard row. Accepts a list of **tuples**, each in the format `(id, label)`. The `label` field is what's displayed on the screen, the `id` field is the string that gets returned upon selection. If the user selects `c`, the operation is canceled and an empty `id` string is returned.
|
||||
|
||||
### `deck.time`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user