diff --git a/main.py b/main.py index d39a2a18817f57cc258e321fd02295b341531498..18892ed4b68d2842a7d9ba6a95b46c2789957fa6 100644 --- a/main.py +++ b/main.py @@ -4,12 +4,13 @@ from kivy.core.window import Window # For inspection. from kivy.properties import NumericProperty class OrderApp(App): + instance = NumericProperty(0) + amount = NumericProperty(0) total = NumericProperty(0) # in cents def build(self): inspector.create_inspector(Window, self) # For inspection (press control-e to toggle). def amount_changed(self): - self.total= round(self.root.ids.food.value*100) - + self.total = round(self.root.ids.food.value * 100) if __name__ == '__main__': diff --git a/order.kv b/order.kv index e57aee9503a2f267670b96c32e47018e9ddc0938..7a6963d58851c1885908f1e6040c6723e08c2932 100644 --- a/order.kv +++ b/order.kv @@ -26,3 +26,39 @@ BoxLayout: Label: text: f' your total is ${app.total /100:.2f}.' font_size: sp(24) + + + + BoxLayout: + Label: + text: 'Switch to enter your order' + Switch: + id: switch + Label: + + text: 'your order is done' if switch.active else 'Wait your order is still working' + + + + ToggleButton: + text: 'Male' + group: 'Gender' + ToggleButton: + text: 'Female' + group: 'Gender' + status: 'Down' + + Image: + source: 'Em.jpg' + size: self.texture_size + size_hint: (2,2) + + + + + + + + + +