Commit 0626ee12 authored by [sabdelmoaty2]'s avatar [sabdelmoaty2]
Browse files

Make ToggleButton and ProgressBar for displaying.

parent 7cd4824c
from import App
from kivy.modules import inspector # For inspection.
from kivy.core.window import Window # For inspection.
from kivy.modules import inspector # For inspection.
from import NumericProperty
from import BooleanProperty
from kivy.uix.progressbar import ProgressBar
class OrderApp(App):
total = NumericProperty(0) # In cents.
amount_of_meals = NumericProperty(0)
H_food = BooleanProperty(False)
num_of_ppl = NumericProperty(0)
def build(self):
inspector.create_inspector(Window, self) # For inspection (press control-e to toggle).
def Num_of_ppl(self, group):
if group:
print(f'{self.amount_of_meals / group}')
print(f"No meals")
def food_sorting(self, Home_food):
self.H_food = Home_food
def amount_changed(self): = round( * 100)
if __name__ == '__main__':
app = OrderApp()
......@@ -17,7 +17,27 @@ BoxLayout:
size: self.texture_size
padding: (sp(12), 0)
id: food
range: (0, 100)
on_value: app.amount_changed()
text: f'Your total is $0.00'
text:f'your total is ${ / 100:.2f}'
font_size: sp(24)
text: 'Home food'
group: 'Food_sorting'
state: 'down'
on_release: app.food_sorting(True)
text: 'Fast food'
group: 'Food_sorting'
on_release: app.food_sorting(False)
max: 1000
value: 750
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