-
Notifications
You must be signed in to change notification settings - Fork 1
/
quiz.kv
85 lines (77 loc) · 2.33 KB
/
quiz.kv
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<OptionButton>
font_name:"LuckiestGuy"
font_size:"40sp"
background_color:1,1,1,0
bg_color:40/255,6/255,109/255,1
on_release:app.quiz(self.text)
canvas.before:
Color:
rgb:root.bg_color
RoundedRectangle:
size: self.size
pos: self.x,self.y+5
radius:[10]
MDScreen:
question:question
name:"quiz"
MDFloatLayout:
md_bg_color : rgba(60,12,156,255)
MDLabel:
id:question
text:"49+12 = ?"
font_name:"LuckiestGuy"
font_size:"60sp"
halign:"center"
pos_hint:{"center_x":.5, "center_y":.85}
color:1,1,1,1
line_height:1.1
MDGridLayout:
rows:2
cols:2
size_hint:.6,.4
pos_hint:{"center_x":.5, "center_y":.55}
spacing:15
OptionButton:
text:"49"
bg_color:40/255, 6/255, 109/255, 1
OptionButton:
text:"49"
bg_color:87/255, 23/255, 213/255, 1
OptionButton:
text:"49"
bg_color:87/255, 23/255, 216255, 1
OptionButton:
text:"49"
bg_color:40/255, 6/255, 109/255, 1
Button:
text:"ReStart"
font_name:"LuckiestGuy"
font_size:"40sp"
size_hint: .55, .12
pos_hint:{"center_x":.5, "center_y":.10}
background_color:1,1,1,0
on_release:
root.manager.current="start"
canvas.before:
Color:
rgb:rgba(251,187,30,255)
RoundedRectangle:
size: self.size
pos: self.x,self.y+5
radius:[10]
Button:
text:"Quit"
font_name:"LuckiestGuy"
font_size:"40sp"
size_hint: .55, .12
pos_hint:{"center_x":.5, "center_y":.27}
background_color:1,1,1,0
on_release:
root.manager.current="final_score"
canvas.before:
Color:
rgb:rgba(251,187,30,255)
RoundedRectangle:
size: self.size
pos: self.x,self.y+5
radius:[10]