-
Notifications
You must be signed in to change notification settings - Fork 0
/
menuSystem.yml
71 lines (65 loc) · 1.46 KB
/
menuSystem.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
menuSystem:
# Home Menu
- name: "home"
properties:
- home
text: |
Welcome to home menu.
Please choose action:
items:
- name: "add"
text: "Add"
gotoMenu: "addFirst"
- name: "exit"
text: "Exit"
gotoMenu: "exitWithConfirm"
#inbuilt: "@exit"
# Add First Number Input
- name: "addFirst"
text: "Enter first value:"
gotoMenu: "addSecond"
inputRules:
- { rule: "@IsNumber", errorMessage: "First value should be a number" }
bindings: { field: "addFirst" }
# Add Second Number Input
- name: "addSecond"
text: "Enter second value:"
bindings: { field: "addSecond", method: "add" }
gotoMenu: "exitWithConfirm"
# Exit Menu
- name: "exitMenu"
properties:
- exit
- noInput
text: "Bye"
#gotoMenu: "123"
# gotoLeadsToNonExistingItem validation
- name: "exitWithConfirm"
# useTemplate:
# name: "yesNoMenuTemplate"
# params:
# - yesGoto: "exitMenu"
# - noGoto: "home"
text: "Are you sure?"
items:
- name: "y"
text: "Yes"
inputAlternatives:
- "y"
- "yes"
- "true"
- "+"
- "++"
- "OK"
- "die"
gotoMenu: "exitMenu"
- name: "n"
text: "No"
inputAlternatives:
- "n"
- "no"
- "false"
- "-"
- "--"
- "nope"
gotoMenu: "home"