-
Notifications
You must be signed in to change notification settings - Fork 1
/
dump.txt
130 lines (97 loc) · 3.28 KB
/
dump.txt
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
class ___PenButton(Button):
def __init__(self, **kwargs):
super(PenButton, self).__init__(**kwargs)
self.text = "Pen"
self.font_size = 20
def on_release(self):
Tile.to_draw_mode()
class ___StampButton(Button):
def __init__(self, **kwargs):
super(StampButton, self).__init__(**kwargs)
self.text = "Stamp"
self.font_size = 20
def on_release(self):
Tile.to_stamp_mode()
class ___ChooseStampButton(Button):
def __init__(self, **kwargs):
super(ChooseStampButton, self).__init__(**kwargs)
self.text = "Choose Stamp"
self.font_size = 20
def on_release(self):
root.ids["grid"].stop()
root.ids["play_pause_button"].stop()
root.current = "stamp_screen"
class ___SettingsButton(Button):
def __init__(self, **kwargs):
super(SettingsButton, self).__init__(**kwargs)
self.text = "Settings"
self.font_size = 20
def on_release(self):
root.ids["play_pause_button"].stop()
root.ids["grid"].stop()
class ___PlayPauseButton(Button):
def __init__(self, **kwargs):
super(PlayPauseButton, self).__init__(**kwargs)
self.text = "Play"
self.font_size = 20
self.playing = False
def stop(self):
self.text = "Play"
self.playing = False
def on_release(self):
if not self.playing:
root.ids["grid"].save_state()
if not self.playing:
self.playing = True
self.text = "Stop"
else:
self.playing = False
self.text = "Play"
root.ids["grid"].toggle()
class ____NextButton(Button):
def __init__(self, **kwargs):
super(NextButton, self).__init__(**kwargs)
self.text = "Next"
self.font_size = 20
def on_release(self):
root.ids["grid"].update_board()
print "width:", Window.width
print "height:", Window.height
class ___RestoreButton(Button):
def __init__(self, **kwargs):
super(RestoreButton, self).__init__(**kwargs)
self.text = "Restore"
self.font_size = 20
def on_release(self):
root.ids["grid"].load_initial_state()
class ___SaveButton(Button):
def __init__(self, **kwargs):
super(SaveButton, self).__init__(**kwargs)
self.text = "Save"
self.font_size = 20
def on_release(self):
root.ids["grid"].stop()
root.ids["play_pause_button"].stop()
root.ids["grid"].record_stamp()
if root.ids["grid"].stamp == None:
return
root.current = "save_stamp_screen"
class ___ClearButton(Button):
def __init__(self, **kwargs):
super(ClearButton, self).__init__(**kwargs)
self.text = "Clear"
self.font_size = 20
def on_release(self):
root.ids["grid"].clear_board()
root.ids["grid"].stop()
root.ids["play_pause_button"].stop()
print root.ids["grid"].tiles
print len(root.ids["grid"].children)
class ___RandomButton(Button):
def __init__(self, **kwargs):
super(RandomButton, self).__init__(**kwargs)
self.text = "Random"
self.font_size = 20
def on_release(self):
root.ids["play_pause_button"].stop()
root.ids["grid"].randomize()