-
Notifications
You must be signed in to change notification settings - Fork 0
/
kv_app.kv
135 lines (127 loc) · 3.36 KB
/
kv_app.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
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
130
131
132
133
134
135
<SelectionMenu@BoxLayout>:
Button:
text: 'align x'
on_press: root.mode.align_x()
Button:
text: 'align y'
on_press: root.mode.align_y()
ToggleButton:
text: 'highlight'
on_press: root.mode.highlight_toggle()
ToggleButton:
text: 'field_of_view'
on_press: root.mode.fov_toggle()
ToggleButton:
text: 'angle'
ToggleButton:
text: 'distance'
<ModeButton@ToggleButton>:
group: 'mode'
on_press: self.field.set_mode(self.text)
<LoadDialog>:
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
FileChooserListView:
id: filechooser
path: "./plays"
filters: '\*.yaml'
BoxLayout:
size_hint_y: None
height: 30
Button:
id: test
text: "Cancel"
on_release: root.cancel()
Button:
text: "Load"
on_release: root.load(filechooser.selection[0])
<SelectionRect>
size_hint: None, None
canvas:
Color:
rgba: 1, 0, 0, 0.1
Rectangle:
pos: self.pos
size: self.size
<PlayerWidget>:
# Define the properties for the DragLabel
drag_rectangle: self.x, self.y, self.width, self.height
drag_timeout: 10000000
drag_distance: 0
size_hint: (None, None)
canvas.before:
Color:
rgba: 1, 0, 0, 0
Ellipse:
pos: self.pos
size: self.size
Label:
text: root.label
pos: root.pos
size: root.size
BoxLayout:
orientation: 'vertical'
BoxLayout:
height: 100
size_hint: 1, None
Button:
text: 'undo'
on_press: field.undo()
Button:
text: 'redo'
on_press: field.redo()
TextInput:
id: text_input
hint_text: 'enter command'
multiline: False
on_text_validate: field.execute_text_command(self.text)
minimum_width: 300
width: 300
size_hint: None, None
Button:
text: 'Take Picture'
on_press: field.take_picture()
GridLayout:
cols: 2
rows: 2
ModeButton:
text: 'add'
field: field
ModeButton:
text: 'move'
field: field
ModeButton:
text: 'select'
field: field
ModeButton:
text: 'hex'
field: field
Button:
text: 'Save'
on_press: field.save_state()
Button:
text: 'Load'
on_press: field.load_dialog()
Button:
text: 'Template'
on_press: field.load_template_dialog()
Button:
text: 'Previous Frame'
on_press: field.load_frame(field.frame_number - 1)
Label:
id: frame_number_label
Button:
text: 'Next Frame'
on_press: field.load_frame(field.frame_number + 1)
Button:
text: 'render'
on_press: field.render()
Field:
id: field
frame_number_label: frame_number_label
text_input: text_input
size_hint: None, None
height: 670
width: 1800