Commit 93137251 authored by Brandon Huettner's avatar Brandon Huettner
Browse files

My first commit of the app!

parent 1f0ddda5
......@@ -9,9 +9,22 @@ __flags__ = ['--bootstrap=sdl2', '--requirements=python2,kivy', '--orientation=l
class OrderApp(App):
charge = 9.99
def build(self):
inspector.create_inspector(Window, self) # For inspection (press control-e to toggle).
def update_cost(self):
if self.root.ids.size_slider.value < 50:
self.charge = "10.99"
self.root.ids.price.text = self.charge
elif self.root.ids.size_slider.value == 50:
self.charge = "11.99"
self.root.ids.price.text = self.charge
elif self.root.ids.size_slider.value > 50:
self.charge = "12.99"
self.root.ids.price.text = self.charge
if __name__ == '__main__':
app = OrderApp()
......
BoxLayout:
orientation: 'vertical'
Label:
text: '[Your meal-ordering GUI here]'
text: 'HuHot'
font_size: '42sp'
color: [255,0,0,1]
BoxLayout:
orientation: 'vertical'
Label:
text: 'Build your meal:'
BoxLayout:
orientation: 'vertical'
Label:
text: 'Meats:'
BoxLayout:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
CheckBox:
BoxLayout:
orientation: 'horizontal'
Label:
text: 'Beef'
halign: 'right'
BoxLayout:
orientation: 'vertical'
Label:
text: 'Vegetables:'
BoxLayout:
orientation: 'vertical'
Label:
text: 'Sauces:'
BoxLayout:
orientation: 'vertical'
Label:
text: 'Meal Size'
Slider:
orientation: 'horizontal'
padding: '100sp'
step: 50
id: size_slider
on_value_pos: app.update_cost()
Label:
text: 'Little Warrier'
halign: 'left'
Label:
text: 'bigger'
halign: 'center'
Label:
text: 'biggest'
halign: 'right'
BoxLayout:
orientation: 'vertical'
Label:
id: price
text: str(app.charge)
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