-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMy.kv
More file actions
96 lines (92 loc) · 3.6 KB
/
My.kv
File metadata and controls
96 lines (92 loc) · 3.6 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
WindowManager:
MainWindow:
FoodTrackingWindow: #Makes the classes screens
RecipeWindow:
RecipeList:
<MainWindow>:
name: "first" #Home Page
GridLayout:
rows:3
Label:
text:"Welcome to App that has not been made and has no name"
BoxLayout:
orientation:"horizontal"
Button:
text:"Food Tracker"
on_release:
app.root.current="second" #Goes to food tracker window. Haven't designed that yet
root.manager.transition.direction="right"
pos_hint: {"center_x":0.3}
Button:
text:"Recipes"
on_release:
app.root.current="third"
root.manager.transition.direction="left"
pos_hint: {"center_x":0.3}
<FoodTrackingWindow>:
name: "second"
BoxLayout: #Work in Progress
Label:
text:"Food Tracker"
ActionBar: #Explained on line 67
size: root.width, 50
pos_hint: {'top':1}
ActionView:
ActionPrevious:
with_previous:False
ActionButton:
text:"Home"
on_release:
app.root.current="first"
root.manager.transition.direction="left"
<RecipeWindow>:
name: "third"
BoxLayout:
orientation:"vertical"
Label:
text:"Recipes"
BoxLayout:
orientation:"horizontal"
Button: #Press this and you open up the food scanner. However for testing purposes i have a sample input so it wont open webcam
text:"Scan Food"
on_release:
app.root.current="fourth"
root.on_button_click() #Calls function on line 144 of the python file
root.manager.transition.direction="up" #Thid and line 55 move the screen
pos_hint: {"right":1}
size_hint: 0.5,None
Button:
text:"Look at list"
on_release:
app.root.current="fourth"
root.manager.transition.direction="up"
pos_hint: {"left":1}
size_hint: 0.5,None
ActionBar: #The action bar is the menu bar along the top of the screen
size: root.width, 50
pos_hint: {'top':1}
ActionView:
ActionPrevious:
with_previous:False #There is a useless button on the menu bar when you make one so this deletes it
ActionButton:
text:"Home"
on_release:
app.root.current="first" #Moves the screen to home screen
root.manager.transition.direction="right"
<RecipeList>:
name:"fourth"
Button:
text:"Show recipes" #This is the screen which shows the recipes. If you press the button, it will show 10 different buttons for 10 recipes
on_release:
root.on_show_recipe_button_click() #This is the function from lines 148-162 on python file
ActionBar:
size: root.width, 50
pos_hint: {'top':1}
ActionView:
ActionPrevious:
with_previous:False
ActionButton:
text:"Home"
on_release:
app.root.current="first"
root.manager.transition.direction="down"