2020-08-16 14:24:47 +02:00
|
|
|
#!/usr/bin/env python3
|
2020-08-20 02:00:03 +02:00
|
|
|
from clintermission import CliMultiMenu, CliSelectionStyle, CliMenuCursor
|
2020-08-16 14:24:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
# --- simple multiselect ---
|
|
|
|
q = [
|
|
|
|
"Option 1",
|
|
|
|
"Option 2",
|
|
|
|
("Option 3 (preselected for your convenience)", "Option 3", True),
|
|
|
|
"Option 4"
|
|
|
|
]
|
|
|
|
m = CliMultiMenu(q, "Make your choice (<space> selects, <return> accepts):\n", cursor=CliMenuCursor.ASCII_ARROW,
|
2020-08-20 02:00:03 +02:00
|
|
|
selection_icons=CliSelectionStyle.CHECKMARK)
|
2020-08-16 14:24:47 +02:00
|
|
|
|
|
|
|
print("You selected", m.get_selection())
|
|
|
|
print("You selected num:", m.get_selection_num())
|
|
|
|
print("You selected item:", m.get_selection_item())
|