-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInter1.kv
More file actions
64 lines (59 loc) · 1.71 KB
/
Inter1.kv
File metadata and controls
64 lines (59 loc) · 1.71 KB
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
#:kivy 1.10.1
<BG>:
#:set roadWidth 160
canvas:
Color:
rgb: 0.4, 0.8, 0.4
Rectangle:
size: self.width, self.height
pos: 0, 0
Color:
rgb: 0.2, 0.2, 0.2
Rectangle:
pos: self.center_x-roadWidth/2, 0
size: roadWidth, self.height
Rectangle:
pos: 0, self.center_y-roadWidth/2
size: self.width, roadWidth
Color:
rgb: 0.7, 0.7, 0.1
Line:
width: 2
points: [0, self.center_y, self.right, self.center_y]
dash_length: 40
dash_offset: 30
Line:
width: 2
points: [self.center_x, 0, self.center_x, self.top]
dash_length: 40
dash_offset: 30
Color:
rgb: 0.2, 0.2, 0.2
Rectangle:
pos: self.center_x-roadWidth/2, self.center_y-roadWidth/2
size: roadWidth, roadWidth
<Car>:
size_hint: None, None
size: 40, 40
canvas.before:
PushMatrix
Rotate:
angle: root.angle
origin: self.center_x, self.center_y
Color:
rgb: root.r, root.g, root.b
Rectangle:
size: self.width-2, self.height-4
pos: self.center_x-self.width/2+1, self.center_y-self.height/2+2
Color:
rgb: 0.8, 0.9, 1
Rectangle:
size: self.width-2, self.height*0.35-2
pos: self.center_x-self.width/2+1, self.center_y-self.height/2+2
Color:
rgb: root.r, root.g, root.b
Line:
rounded_rectangle: [self.x, self.y, self.width, self.height, 10]
width: 2
canvas.after:
PopMatrix