Skip to content
Snippets Groups Projects
Commit b13f1dd1 authored by bmois2's avatar bmois2
Browse files

Completed. Added spinner for sides instead of checkbox/radio buttons.

Also added progress bar so it looks a lil nicer.
parent 6c9c8300
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,13 @@ class OrderApp(App):
self.total_cost = 0
print('Reset')
#def fires(self,):
def spinner_activated(self,value):
if value == "Fries":
self.total_cost += 3
elif value == "Onion Ring":
self.total_cost += 2
else:
self.total_cost += 1
if __name__ == '__main__':
......
......@@ -40,9 +40,17 @@ BoxLayout:
BoxLayout:
orientation: 'horizontal'
Label:
text: 'Fries?'
font_size: sp(26)
CheckBox:
text: 'Pick sides: '
size_hint: (None, 1.0)
size: self.texture_size
padding: (sp(12), 0)
Spinner:
id: spinner1
text: "Sides"
values: ["Fries","Onion Rings","Pickles"]
on_text: app.spinner_activated(spinner1.text)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment