-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdurak.kv
74 lines (63 loc) · 1.65 KB
/
durak.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
#:kivy 1.11.1
#:import SPADES durak.SPADES
#:import HEARTS durak.HEARTS
#:import DIAMS durak.DIAMS
#:import CLUBS durak.CLUBS
<Card>:
font_name: 'resources/Arial.ttf'
halign: 'center'
font_size: '32dp'
width: '64dp'
height: '120dp'
size_hint: None, None
background_normal: 'resources/rounded_corners.png'
background_down: 'resources/rounded_corners.png'
border: (24, 24, 24, 24)
background_color: (1, 1, 1, 1) if not root.selected else (0.9, 0.9, 0.9, 1)
opacity: 1 if root.state == 'normal' else .8
canvas.before:
PushMatrix
Rotate:
angle: self.rotation
origin: self.center
canvas.after:
PopMatrix
<GameMessageLabel>:
font_name: 'resources/Arial.ttf'
font_size: '22dp'
text: ''
pos: 0, self.width * 0.25
color: 1, 1, 1, 1
opacity: 0
<GameButton@Button>:
text: ''
visible: False
background_normal: 'resources/rounded_corners.png'
background_down: 'resources/rounded_corners.png'
size_hint: (0.3, 0.06)
color: 0, 0, 0, 1
opacity: 1 if self.state == 'normal' else .8
border: (24, 24, 24, 24)
<MainLayout@FloatLayout>:
canvas.before:
Rectangle:
pos: self.pos
size: self.size
source: './resources/bg.jpg'
GameMessageLabel:
id: game_label
pos: 0, self.width * 0.26
GameMessageLabel:
color: 1, 0.4, 0.4, 1
id: error_label
pos: 0, self.width * 0.21
GameButton:
text: 'Бито!'
id: finish_turn_button
pos_hint: {"center_x":0.33,"center_y":0.32}
on_press: app.on_finish_button()
GameButton:
text: 'Отключиться!'
id: disconnect_button
pos_hint: {"center_x":0.66,"center_y":0.32}
on_press: app.on_disconnect_button()