From e1748b8c96167a0865bc4417ae610b237744e428 Mon Sep 17 00:00:00 2001
From: "joshmartin0212@gmail.com" <Cheatman1>
Date: Wed, 25 Jan 2017 11:09:07 -0600
Subject: [PATCH] Added code for an interactive meal ordering app.

---
 main.py  | 22 ++++++++++++++++++++++
 order.kv | 31 ++++++++++++++++++++++++++++++-
 2 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/main.py b/main.py
index da72251..854e03c 100644
--- a/main.py
+++ b/main.py
@@ -1,6 +1,9 @@
 from kivy.app import App
 from kivy.modules import inspector # For inspection.
 from kivy.core.window import Window # For inspection.
+from kivy.properties import NumericProperty
+from kivy.uix import button
+
 
 __app_package__ = 'edu.unl.cse.soft161.order'
 __app__ = 'Order Meal'
@@ -9,9 +12,28 @@ __flags__ = ['--bootstrap=sdl2', '--requirements=python2,kivy', '--orientation=l
 
 
 class OrderApp(App):
+
+    charge_total = NumericProperty(0.00)
+
+
     def build(self):
         inspector.create_inspector(Window, self) # For inspection (press control-e to toggle).
 
+    def update_bite_charge(self):
+        app.charge_total+=1.5
+    def update_mega_charge(self):
+        app.charge_total+=3
+    def update_giga_charge(self):
+        app.charge_total+=8.75
+    def update_tera_charge(self):
+        app.charge_total+=25
+
+
+
+
+
+
+
 
 if __name__ == '__main__':
     app = OrderApp()
diff --git a/order.kv b/order.kv
index d23f974..516263b 100644
--- a/order.kv
+++ b/order.kv
@@ -1,4 +1,33 @@
 BoxLayout:
     orientation: 'vertical'
     Label:
-        text: '[Your meal-ordering GUI here]'
+        text: 'Bits and Bites'
+        font_size: 45
+        bold: True
+    Label:
+        text: 'By: Josh Martin'
+        font_size: 20
+    Label:
+        text: 'Subtotal: $'+ str(app.charge_total)
+    Button:
+        text: 'Restart Order'
+        on_press: app.charge_total=0.0
+    Button:
+        id: bite
+        text: 'Add to order: One Bite - $1.50'
+        on_press: app.update_bite_charge()
+    Button:
+        id: mega
+        text: 'Add to order: One Megabite - $3.00'
+        on_press: app.update_mega_charge()
+    Button:
+        id: giga
+        text: 'Add to order: One Gigabite - $8.75'
+        on_press: app.update_giga_charge()
+    Button:
+        id: tera
+        text: 'Add to order: One Terabite - $25.00'
+        on_press: app.update_tera_charge()
+
+
+
-- 
GitLab