Commit a99d8b4a authored by JP Thornton's avatar JP Thornton
Browse files

Added finished order screen

parent 956240e5
BoxLayout:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
Button:
size_hint: (.33, 1)
text: 'Meal 1'
on_press: app.add_meal()
on_press: app.meal = 1
Button:
size_hint: (.33, 1)
text: 'Meal 2'
on_press: app.add_meal()
on_press: app.meal = 2
Button:
size_hint: (.33, 1)
text: 'Meal 3'
on_press: app.add_meal()
on_press: app.meal = 3
BoxLayout:
orientation: 'horizontal'
Button:
size_hint: (.33, 1)
text: 'Meal 4'
on_press: app.add_meal()
on_press: app.meal = 4
Button:
size_hint: (.33, 1)
text: 'Meal 5'
on_press: app.add_meal()
on_press: app.meal = 5
Button:
size_hint: (.33, 1)
text: 'Meal 6'
on_press: app.add_meal()
on_press: app.meal = 6
BoxLayout:
orientation: 'horizontal'
ScreenManager:
Screen:
name: 'order'
BoxLayout:
Label:
text: 'Your order:'
size_hint: (.65, 1)
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
Button:
size_hint: (.33, 1)
text: 'Meal 1 $10.00'
on_press: app.add_meal()
on_press: app.meal = 1
Button:
size_hint: (.33, 1)
text: 'Meal 2 $5.00'
on_press: app.add_meal()
on_press: app.meal = 2
Button:
size_hint: (.33, 1)
text: 'Meal 3 $7.50'
on_press: app.add_meal()
on_press: app.meal = 3
BoxLayout:
orientation: 'horizontal'
Button:
size_hint: (.33, 1)
text: 'Meal 4 $8.00'
on_press: app.add_meal()
on_press: app.meal = 4
Button:
size_hint: (.33, 1)
text: 'Meal 5 $12.00'
on_press: app.add_meal()
on_press: app.meal = 5
Button:
size_hint: (.33, 1)
text: 'Meal 6 $20.00'
on_press: app.add_meal()
on_press: app.meal = 6
BoxLayout:
orientation: 'horizontal'
BoxLayout:
orientation: 'vertical'
Label:
text: 'Your order: '
size_hint: (1, .15)
Label:
text: app.order
size_hint: (1, .85)
BoxLayout:
orientation: 'vertical'
Label:
text: 'Order total: ' + str('%.2f' % app.total)
size_hint: (1, .5)
Label:
text: 'Total + Tax: ' + str('%.2f' % app.total_tax)
size_hint: (1, .5)
BoxLayout:
orientation: 'vertical'
size_hint: (.33, 1)
Button:
id: 'next'
disabled: app.next_bool
size_hint: (1, .5)
text: 'Next'
on_press:
root.transition.direction = 'up'
root.current = 'completed'
Button:
size_hint: (1, .5)
text: 'Cancel'
on_press: app.reset()
Screen:
name: 'completed'
BoxLayout:
orientation: 'vertical'
Label:
text: 'Order total: ' + str(app.total)
size_hint: (.35, 1)
text: 'Your order has been placed!'
Label:
text: 'Total + Tax: ' + str('%.2f' % app.total_tax)
BoxLayout:
orientation: 'vertical'
size_hint: (.5, 1)
Button:
size_hint: (1, .5)
text: 'Next'
Button:
size_hint: (1, .5)
text: 'Cancel'
text: 'You have been charged $' + str('%.2f' % app.total_tax)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment