-
Notifications
You must be signed in to change notification settings - Fork 0
/
drink.py
36 lines (28 loc) · 879 Bytes
/
drink.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
# from kivy.uix.label import Label
# from kivy.uix.textinput import TextInput
# from kivy.uix.button import Button
# from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
# from kivy.graphics import Rectangle, Color
from kivy.uix.screenmanager import Screen, ScreenManager
class SetScreen(Screen):
pass
class Manager(ScreenManager):
pass
class MainScreen(Screen):
goal = ObjectProperty(None)
quantity = ObjectProperty(None)
progress = ObjectProperty(None)
def pressed(self):
self.goal.value+= int(self.quantity.value)
self.quantity.value = 0
self.progress.text = str(self.goal.value*100//7000)+'%'
print(self.progress.text)
print(self.goal.value)
class Drink(App):
def build(self):
return
if __name__ == '__main__':
Drink().run()