forked from LordIkol/PZ_MapCleaner
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
321 lines (291 loc) · 17.1 KB
/
index.html
File metadata and controls
321 lines (291 loc) · 17.1 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- External CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/11.0.2/css/bootstrap-slider.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- Local CSS -->
<link rel="stylesheet" href="openseadragon/annotorious.min.css">
<link rel="stylesheet" type="text/css" href="custom.css">
<!-- Javascript - Only Slider because it sometimes does not load correctly at the end -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/11.0.2/bootstrap-slider.js"></script>
<title>Zomboid Map Cleaner v0.3</title>
</head>
<body class="bg-dark">
<div id="overlay">
<div class="h-100 row align-items-center">
<div class="col-6 offset-md-3">
<div id="OverallProgress" class="progress" style="height: 30px;">
<div id="OverallProgressBar" class="progress-bar progress-bar-striped progress-bar-animated display-4"
role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
Areas cleared
</div>
<span id="OverallProgressBarLegend" class="progress-legend">
</span>
</div>
<div id="CurrentProgress" class="progress" style="height: 30px;">
<div id="CurrentProgressBar" class="progress-bar bg-info display-4" role="progressbar"
style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
Current Area 0%
</div>
<span id="CurrentProgressBarLegend" class="progress-legend">
</span>
</div>
</div>
</div>
</div>
<div id="wrapper" class="wrapper">
<div class="container min-vh-100 min-vw-100 d-flex flex-column">
<div class="row header bg-primary">
<div class="col-md-12 header-center">
<h1>Zomboid Map Cleaner</h1>
</div>
</div>
<div class="row flex-grow-1">
<div class="col-12">
<div class="row">
<div class="col-12">
<div id="coordinates-text" class="position h3 text-light header-center">
Image: (0,0)
</div>
</div>
</div>
<div class="row h-100">
<div class="col-2 bg-secondary">
<button id="setGameSaveFolder" type="button" class="btn btn-primary m-3">
Save Folder
</button>
<button id="setSafehouses" type="button" class="btn btn-primary m-3" data-toggle="modal" data-target="#safehouses-modal">
Safe Houses
</button>
<div class="card m-3">
<div class="card-header h5">
Safehouses Config
</div>
<div class="form-check m-2">
<!-- Make this a tooltip -->
<span>Use this to increase a margin around safehouses to preserve</span>
</div>
<div class="form-check m-2">
<div class="row">
<div class="col-3">
<label for="safehouses-slider" class="form-check-label">Margin: </label>
</div>
<div class="col-9">
<input id="safehouses-slider" class="form-check-input" data-slider-id='safehouses-slider-component' type="text"
data-slider-min="0" data-slider-max="20" data-slider-step="1" data-slider-value="10"/>
</div>
</div>
</div>
</div>
<div class="card m-3">
<div class="card-header h5">
Delete Options
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<h6>General</h6>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="keepSafehousesCheckbox" checked>
<label class="form-check-label" for="keepSafehousesCheckbox">
Keep safehouses
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="ignoreAnnotationsCheckbox" checked>
<label class="form-check-label" for="ignoreAnnotationsCheckbox">
Ignore annotations
</label>
</div>
</li>
<li class="list-group-item">
<h6>Annotations</h6>
<fieldset id="annotationsFieldset" disabled="true">
<div class="form-check">
<input class="form-check-input" type="radio" name="annotationsRadio" id="annotationsKeepRadio" value="option1" disabled>
<label class="form-check-label" for="annotationsKeepRadio">
keep data
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="annotationsRadio" id="annotationsDeleteRadio" value="option2" checked>
<label class="form-check-label" for="annotationsDeleteRadio">
delete data
</label>
</div>
</fieldset>
</li>
</ul>
</div>
<div class="card m-3">
<div class="card-header h5">
Data to Delete
</div>
<div class="form-check m-2">
<input class="form-check-input" type="checkbox" value="" id="chk_Mapdata" checked>
<label class="form-check-label" for="chk_Mapdata">
Map
</label>
</div>
<div class="form-check m-2">
<input class="form-check-input" type="checkbox" value="" id="chk_Chunkdata">
<label class="form-check-label" for="chk_Chunkdata">
Chunk
</label>
</div>
<div class="form-check m-2">
<input class="form-check-input" type="checkbox" value="" id="chk_ZpopData">
<label class="form-check-label" for="chk_ZpopData">
Zombie Population
</label>
</div>
</div>
<button id="test" type="button" class="btn btn-danger m-3">
Delete Files
</button>
</div>
<div class="col-8" id="openseadragon1"></div>
<div class="col-2 bg-secondary">
<!-- <ul class="list-group" id="folder-info"></ul>-->
<div class="card m-3">
<div class="card-header h5">
Display Zones
</div>
<div class="form-check m-2">
<input class="form-check-input zone-display-check" type="checkbox" value="" id="check_Mapdata_show" checked>
<label class="form-check-label" for="check_Mapdata_show">
Map
</label>
</div>
<div class="form-check m-2">
<input class="form-check-input zone-display-check" type="checkbox" value="" id="check_Chunkdata_show" checked>
<label class="form-check-label" for="check_Chunkdata_show">
Chunk
</label>
</div>
<div class="form-check m-2">
<input class="form-check-input zone-display-check" type="checkbox" value="" id="check_ZpopData_show" checked>
<label class="form-check-label" for="check_ZpopData_show">
Zombie Population
</label>
</div>
<div class="form-check m-2">
<input class="form-check-input zone-display-check" type="checkbox" value="" id="check_Safehouses_show" checked>
<label class="form-check-label" for="check_Safehouses_show">
Safe houses
</label>
</div>
</div>
<div class="card m-3">
<div class="card-header h5">
Help
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<h6>Zoom</h6>
Mousewheel/Double Click
</li>
<li class="list-group-item">
<h6>Create an annotation</h6>
Hold <kbd>Shift</kbd> + Drag Mouse
</li>
<li class="list-group-item">
<h6>Select an annotation</h6>
Single click on an annotation
</li>
<li class="list-group-item">
<h6>Edit an annotation</h6>
Select annotation, drag vertices
</li>
<li class="list-group-item">
<h6>Delete an annotation</h6>
Select annotation, press <kbd>Delete</kbd>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="row footer ">
<div class="col-12"></div>
</div>
</div>
<!-- jQuery first, then project files, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"></script>
<!-- Project JavaScript -->
<script src="openseadragon/openseadragon.min.js"></script>
<script src="openseadragon/openseadragon-annotorious.min.js"></script>
<script src="utils.js"></script>
<script src="mapdisplay.js"></script>
<script src="drawoverlay.js"></script>
<script src="main.js"></script>
<!-- Optional JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
</div>
<!-- Safehouses Modal -->
<div class="modal fade" id="safehouses-modal" tabindex="-1" role="dialog" aria-labelledby="safehousesModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="safehousesModalLabel">Define your safehouses locations</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="container">
<div class="row col-12">
<p>
Here you may input your safehouses locations.
You must input each safehouse on a different line.
</p>
<br>
<p>
A location is defined as
<code>startX<SEP>startY<SEP>endX<SEP>endY</code>,
where <code><SEP></code> is a any of the following separators
<code>, / x X - <space></code>. There will be a preview at the side for you to check.
</p>
<br>
<p>
Example 1:
<code>1153x1120,1180x1160</code><br>
Example 2:
<code>1153 1120 1180 1160</code><br>
Example 3:
<code>1153-1120/1180-1160</code>
</p>
</div>
<div class="row">
<div class="col-6">
<textarea name="safehouses-text" id="safehouses-text" onchange="onSafehousesChange()" cols="45" rows="10"></textarea>
</div>
<div class="col-6">
<pre id="safehouses-preview"></pre>
</div>
</div>
<div class="row">
<p>This input is saved locally on your browser, so you can reuse it even after a page refresh.</p>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" onclick="saveSafehousesEdit()" data-dismiss="modal">Save changes</button>
</div>
</div>
</div>
</div>
</body>
</html>