forked from steppin/tagpro-map-editor
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
640 lines (589 loc) · 39.1 KB
/
index.html
File metadata and controls
640 lines (589 loc) · 39.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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>TagPro Map Editor</title>
<script src="generatepng.js"></script>
<script src="jquery-2.1.0.min.js"></script>
<script src="bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div style="position:fixed;left:0;top:0;bottom:0;width:320px;overflow-y:auto;overflow-x:hidden;padding:10px;">
<div class="form-group">
<div class="btn-group btn-group-justified">
<div class="btn-group">
<button class="btn btn-default" data-target="#instructions" data-toggle="modal"><span class="glyphicon glyphicon-info-sign"></span> Instructions</button>
</div>
<div class="btn-group">
<button id="save" class="btn btn-default" data-target="#saveDialog" data-toggle="modal"><span class="glyphicon glyphicon-floppy-disk"></span> Storage</button>
</div>
</div>
</div>
<div class="form-group">
<div class="btn-group btn-group-justified">
<div class="btn-group">
<button class='btn btn-default' data-toggle="dropdown"><span class="glyphicon glyphicon-import"></span> Import <span class="caret"></span></button>
<ul id="menuImport" class="dropdown-menu" style="margin-top: 35px;top:auto;left:0;right:auto;" role="menu">
<li><a style="overflow:hidden;text-overflow:ellipsis;" data-target="#import" data-toggle="modal"><span class="glyphicon glyphicon-file"></span> PNG/JSON files</a></li>
<li><a id="importUrl" style="overflow:hidden;text-overflow:ellipsis;"><span class="glyphicon glyphicon-cloud"></span> (Unfortunate) JukeJuice</a></li>
</ul>
</div>
<div class="btn-group">
<button class='btn btn-default' data-toggle="dropdown"><span class="glyphicon glyphicon-play"></span> Test <span class="caret"></span></button>
<ul id="menuTest" class="dropdown-menu" style="margin-top: 35px;top:auto;left:0;right:auto;" role="menu">
<li><a style="overflow:hidden;text-overflow:ellipsis;"><span class="glyphicon glyphicon-globe"></span> Europe</a></li>
<li><a style="overflow:hidden;text-overflow:ellipsis;"><span class="glyphicon glyphicon-globe"></span> East Coast</a></li>
<li><a style="overflow:hidden;text-overflow:ellipsis;"><span class="glyphicon glyphicon-globe"></span> West Coast</a></li>
<li><a style="overflow:hidden;text-overflow:ellipsis;"><span class="glyphicon glyphicon-globe"></span> Oceanic</a></li>
</ul>
</div>
<div class="btn-group">
<button class='btn btn-default' style="border-top-right-radius:4px;border-bottom-right-radius:4px;" data-toggle="dropdown"><span class="glyphicon glyphicon-export"></span> Export <span class="caret"></span></button>
<ul id="menuExport" class="dropdown-menu" style="margin-top: 35px;top:auto;right:0;left:auto;" role="menu">
<li><a id="exportButton" style="overflow:hidden;text-overflow:ellipsis;" data-target="#export" data-toggle="modal"><span class="glyphicon glyphicon-file"></span> PNG/JSON files</a></li>
<li><a style="overflow:hidden;text-overflow:ellipsis;"><span class="glyphicon glyphicon-cloud"></span> JukeJuice</a></li>
<li><a style="overflow:hidden;text-overflow:ellipsis;"><span class="glyphicon glyphicon-cloud"></span> Unfortunate JukeJuice</a></li>
<li><a id="analytics" style="overflow:hidden;text-overflow:ellipsis;"><span class="glyphicon glyphicon-picture"></span> Analytics</a></li>
</ul>
</div>
</div>
</div>
<div class="form-group">
<div class="btn-group btn-group-justified">
<a id="clear" class="btn btn-default" title="Clear Map"><span class="glyphicon glyphicon-remove"></span></a>
<a id="undo" class="btn btn-default" title="Undo"><span class="glyphicon glyphicon-flipped glyphicon-share-alt"></span></a>
<a id="redo" class="btn btn-default" title="Redo"><span class="glyphicon glyphicon-share-alt"></span></a>
<a id="zoomOut" class="btn btn-default" title="Zoom Out"><span class="glyphicon glyphicon-zoom-out"></span></a>
<a id="zoomIn" class="btn btn-default" title="Zoom In"><span class="glyphicon glyphicon-zoom-in"></span></a>
<a class="btn btn-default btn-block" style="width:2.75%;" title="Map Name/Author/Settings" data-target="#metadata" data-toggle="modal"><span class="glyphicon glyphicon-cog"></span> Metadata</a>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">Map Size:</span>
<label class="form-control" id="resizeWidth">20</label>
<span class="input-group-addon">by</span>
<label class="form-control" id="resizeHeight">20</label>
<span class="input-group-btn">
<button id="resize" class="btn btn-default" title="Resize" style="padding: 6px 10px;" type="button" data-toggle="modal" data-target="#resizeDialog">
<span class="glyphicon glyphicon-resize-full"></span>
</button>
<button id="addWidth" class="btn btn-default" title="Add Columns" style="padding: 6px 10px;">
<span class="glyphicon glyphicon-resize-horizontal"></span>
</button>
<button id="addHeight" class="btn btn-default" title="Add Rows" style="padding: 6px 10px;">
<span class="glyphicon glyphicon-resize-vertical"></span>
</button>
</span>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-xs-4">
<div id="rotate" class="btn-group btn-group-justified" role="toolbar">
<a id="rotateLeft" class="btn btn-default" title="Rotate Left"><span class="glyphicon glyphicon-flipped glyphicon-retweet"></span></a>
<a id="rotateRight" class="btn btn-default" title="Rotate Right"><span class="glyphicon glyphicon-retweet"></span></a>
</div>
</div>
<div class="col-xs-4">
<div id="flip" class="btn-group btn-group-justified" role="toolbar">
<a id="flipVertical" class="btn btn-default" title="Flip Vertical"><span class="glyphicon glyphicon-sort"></span></a>
<a id="flipHorizontal" class="btn btn-default" title="Flip Horizontal"><span class="glyphicon glyphicon-rotate-right glyphicon-sort"></span></a>
</div>
</div>
<div class="col-xs-4">
<div id="mirrorMap" class="btn-group btn-group-justified" role="toolbar">
<a id="mirror" class="btn btn-default" title="Mirror Map" type="button" data-toggle="modal" data-target="#mirrorOptions"><span class="glyphicon glyphicon-rotate-right glyphicon-sound-stereo"></span> / <span class="glyphicon glyphicon-sound-stereo"></span></a>
</div>
</div>
</div>
</div>
<div class="form-group" style="margin-bottom: 5px;">
<div id="tools" role="toolbar">
<div class="btn-group btn-group-justified">
<a id="toolPencil" class="btn btn-default btn-sm" title="Pencil"><span class="glyphicon glyphicon-pencil off-center"></span></a>
<a id="toolBrush" class="btn btn-default btn-sm" title="Brush"><span class="glyphicon glyphicon-th-large off-center"></span></a>
<a id="toolLine" class="btn btn-default btn-sm" title="Line"><span class="glyphicon glyphicon-minus off-center"></span></a>
<a id="toolRectFill" class="btn btn-default btn-sm" title="Filled Rectangle"><span class="glyphicon glyphicon-stop off-center"></span></a>
<a id="toolRectOutline" class="btn btn-default btn-sm" title="Outlined Rectange"><span class="glyphicon glyphicon-unchecked off-center"></span></a>
<a id="toolCircleFill" class="btn btn-default btn-sm" title="Filled Circle"><span class="glyphicon glyphicon-record off-center"></span></a>
<a id="toolCircleOutline" class="btn btn-default btn-sm" title="Outlined Circle"><span class="glyphicon glyphicon-remove-circle off-center"></span></a>
<a id="toolFill" class="btn btn-default btn-sm" title="Fill"><span class="glyphicon glyphicon-tint off-center"></span></a>
<a id="toolWire" class="btn btn-default btn-sm" title="Wire"><span class="glyphicon glyphicon-wrench off-center"></span></a>
<a id="toolClipboard" class="btn btn-default btn-sm" title="Cut/Copy and Paste"><span class="glyphicon glyphicon-folder-close off-center"></span></a>
</div>
</div>
</div>
<div class="form-group">
<select id="symmetry" class="form-control">
<option selected>No Symmetry</option>
<option value="Horizontal">Horizontal Symmetry</option>
<option value="Vertical">Vertical Symmetry</option>
<option value="4-Way">4-Way Symmetry</option>
<option value="Rotational">Rotational Symmetry</option>
</select>
</div>
<div id="palette"></div>
<form id="analyticsForm" action="//tagpro.eu" method="POST" target="tagpro">
<input type="hidden" name="logic" />
<input type="hidden" name="layout" />
</form>
<p style="margin: 10px 0">
<a href="LICENSE.txt" target="tagpro">License</a>
·
<a href="https://github.com/RondingTagPro/tagpro-map-editor" target="tagpro">Source</a>
</p>
</div>
</div>
<div style='position:fixed;top:0;bottom:0;right:0;left:320px;overflow: scroll;white-space: nowrap;' id='map'>
</div>
<canvas width="200" height="200" id='importCanvas' style='display:none'></canvas>
<div class="modal fade" id="metadata" tabindex="-1" role="dialog" aria-labelledby="metadataLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="metadataLabel">Map Metadata</h4>
</div>
<div class="modal-body">
<p>Edit the map name, author and miscellaneous settings below.</p>
<div class="form-group">
<label for="mapName">Map Name</label>
<input type="text" class="form-control" id="mapName" placeholder="Untitled">
</div>
<div class="form-group">
<label for="author">Map Author</label>
<input type="text" class="form-control" id="author" placeholder="Anonymous">
</div>
<div class="form-group">
<label>Map Settings</label>
<div>
<label class="radioLabel" title="Red versus blue, no gravity">
<input type="radio" name="gameMode" class="form-control" id="normalMode" value="normal" checked /><span class="radioSpan">Normal</span>
</label>
<label class="radioLabel" title="Free-for-all, gravity enabled">
<input type="radio" name="gameMode" class="form-control" id="gravityMode" value="gravity"><span class="radioSpan">Gravity</span>
</label>
<label class="radioLabel" title="Red versus blue, gravity enabled">
<input type="radio" name="gameMode" class="form-control" id="gravityCTFMode" value="gravityCTF"><span class="radioSpan">Team Gravity</spawn>
</label>
</div>
<div>
<label class="radioLabel" style="width: auto" title="Hold time limit for any potatoes in milliseconds">
Potato Timer (milliseconds): <input type='number' placeholder='0' min='0' id='potatoTimer' style='width:6em' />
</label>
</div>
<div>
<label class="radioLabel" title="Check to display throwback notice at game start">
<input type="checkbox" class="form-control" id="throwback" /><span class="radioSpan">Throwback</span>
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="import" tabindex="-1" role="dialog" aria-labelledby="importLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="importLabel">Import Map from Files</h4>
</div>
<div class="modal-body">
<p>To import a map, drag and drop its .png and .json files into their respective areas and then click Import.</p>
<div class="form-group">
<div class="row">
<div class="col-xs-6">
<a class="dropArea" draggable="true" id="pngDrop" download="map.png">PNG</a>
</div>
<div class="col-xs-6">
<a class="dropArea" draggable="true" id="jsonDrop" download="map.json">JSON</a>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" id="importConfirm" class="btn btn-primary" data-dismiss="modal">Import</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="export" tabindex="-1" role="dialog" aria-labelledby="exportLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="exportLabel">Export Map to Files</h4>
</div>
<div class="modal-body">
<p>To export a map, click the PNG and JSON buttons to download the files.</p>
<div class="form-group">
<div class="row">
<div class="col-xs-6">
<a class="dropArea hasExportable" draggable="true" id="pngOut">PNG</a>
</div>
<div class="col-xs-6">
<a class="dropArea hasExportable" draggable="true" id="jsonOut">JSON</a>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="saveDialog" tabindex="-1" role="dialog" aria-labelledby="saveLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="saveLabel">Local Storage Slots</h4>
</div>
<div class="modal-body" style="text-align: center;">
<div class="slot empty" id="slot1">
<div>
<h4><p style="color: #888;">Empty</p></h4>
<p></p>
</div>
</div>
<div class="slot empty" id="slot2">
<div>
<h4><p style="color: #888;">Empty</p></h4>
<p></p>
</div>
</div>
<div class="slot empty" id="slot3">
<div>
<h4><p style="color: #888;">Empty</p></h4>
<p></p>
</div>
</div><br><br>
<div class="slot-buttons">
<button type="button" id="editSlot" class="btn btn-primary disabled"><span class="glyphicon glyphicon-edit"></span> Edit Map</button>
<button type="button" id="saveToSlot" class="btn btn-success disabled"><span class="glyphicon glyphicon-floppy-disk"></span> Save to Slot</button>
<button type="button" id="clearSlot" class="btn btn-danger disabled"><span class="glyphicon glyphicon-trash"></span> Clear Slot</button>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="instructions" tabindex="-1" role="dialog" aria-labelledby="instructionsLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="instructionsLabel">Instructions</h4>
</div>
<div class="modal-body panel-group" id="accordion">
<p>Select a tile type from the palette on the left to draw it on the map. You can click and drag on the map for faster drawing. Different tools are available for drawing multiple tiles at once including a line and rectangle shape tool. Mouseover the icons below to see additional information about each tool and click the headings for more details.</p>
<div class="form-group">
<div role="toolbar">
<div class="col-lg-9" style="margin-left: 12.5%">
<div class="btn-group btn-group-justified">
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Pencil" data-content="Paint a tile at a time"><span class="glyphicon glyphicon-pencil"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Brush" data-content="Paint a 3x3 area"><span class="glyphicon glyphicon-th-large"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Line" data-content="Click and drag to draw a line between two points"><span class="glyphicon glyphicon-minus"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Filled Rectangle" data-content="Click and drag to draw a filled in rectangle - hold shift to make a square"><span class="glyphicon glyphicon-stop"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Outlined Rectangle" data-content="Click and drag to draw a one-tile wide outline of a rectangle - hold shift to make a square"><span class="glyphicon glyphicon-unchecked"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Filled Circle" data-content="Click and drag to draw a filled in circle - hold shift to make a perfect circle"><span class="glyphicon glyphicon-record"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Outlined Circle" data-content="Click and drag to draw a one-tile wide outline of a circle - hold shift to make a perfect circle"><span class="glyphicon glyphicon-remove-circle"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Fill" data-content="Fill an area of tiles - hold shift to expand the fill area across diagonally connected tiles"><span class="glyphicon glyphicon-tint"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Wire" data-content="First select a portal or button and then click the exit portal or the gate(s) and bomb(s) the button activates"><span class="glyphicon glyphicon-wrench"></span></a>
<a class="btn btn-default btn-sm" role="button" data-toggle="popover" data-container="#instructions" data-placement="bottom" data-trigger="hover focus" title="Cut/Copy and Paste" data-content="Click and drag to select an area to duplicate, then click and drag to paste a copy elsewhere in its entirety - hold shift while pasting to paste a pattern in a grid or hold control while pasting to cut out the original tiles"><span class="glyphicon glyphicon-folder-close"></span></a>
</div>
</div>
</div>
</div><br><br>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<h5 class="panel-title">
<a>Portal Cooldowns and Button Timers</a>
</h5>
</div>
<div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<p>Portals have modifiable cooldown times, which is 0 seconds by default when using this map editor. To modify a portal's cooldown time, place a portal on the map and shift+click the tile. Enter a new portal cooldown time in the dialog box that appears. Or, modify the default portal cooldown time and all portals at once by shift+clicking the portal icon on the left of the screen. Note that cooldown times must be greater than or equal to 0 and entered in milliseconds where 1000 milliseconds is equivalent to 1 second.</p>
<p>Buttons have modifiable timers as well. By default, button timers are 0 seconds meaning that any button pressed does not remain held down when a player leaves the button. Shift+click a button to change its timer or shift+click the button icon on the left screen to modify the default button timer and change the timer of all buttons at once. Note that button timers are given in seconds and any negative number can be used to make a button permanently active once pressed.
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingTwo" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
<h5 class="panel-title">
<a>Spawn Points and Mars Balls</a>
</h5>
</div>
<div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
<div class="panel-body">
<p>Spawn points and mars balls are placed on top of other map elements. Spawn points can only be placed on floor tiles or team tiles, but mars balls can be placed on top of any other tile type.</p>
<p>Additionally, spawn points have modifiable radii and weights. To modify a spawn point's radius and weight, shift+click the spawn tile on the map. Spawn tiles have a default radius of 5 tiles and a default weight of 1. Increase the weight to increase the frequency that players spawn in that area. The spawn radius must be greater than or equal to 0 where a radius of 0 will force all spawns to that tile only. You can also modify all spawn tiles at once by shift+clicking the spawn ball icon on the left of the screen. Note that both red and blue spawn tiles share the same default settings and will all be changed.</p>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingThree" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
<h5 class="panel-title">
<a>Additional Tools and Information</a>
</h5>
</div>
<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
<div class="panel-body">
<p>You can also resize, rotate, flip, and mirror your map at any point. You can also undo/redo changes by either pressing the undo/redo buttons or pressing z to undo and y to redo. To resize your map you can either use the main resizing tool which will allow you to pick a specific size, or you can quickly add a row or column anywhere on the map by using either of the other two resizing tools. Mouseover the icons below for more information on each tool.</p>
<p>To quickly change the selected tile type, hotkeys are set up for the most common tools and map elements. Press and hold the alt key to temporarily view the hotkeys or double press the alt key to keep the hotkeys permanently visible until you press the alt key again. You can also ctrl+click on an element on the map itself to easily change the selected tile type that.</p>
<div class="form-group">
<div class="row">
<div class="col-xs-3" style="width: 25%">
<div class="btn-group btn-group-justified" role="toolbar">
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Resize" data-content="Allows you to specify a map width and height"><span class="glyphicon glyphicon-resize-full"></span></a>
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Add Columns" data-content="Click and drag to widen your map by adding one or more columns - hold ctrl while dragging to remove the selected columns"><span class="glyphicon glyphicon-resize-horizontal off-center"></span></a>
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Add Rows" data-content="Click and drag to make your map taller your map by adding one or more rows - hold ctrl while dragging to remove the selected rows"><span class="glyphicon glyphicon-resize-vertical off-center"></span></a>
</div>
</div>
<div class="col-xs-3" style="width: 18.5%">
<div class="btn-group btn-group-justified" role="toolbar">
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Undo" data-content="Undo the most recent change"><span class="glyphicon glyphicon-flipped glyphicon-share-alt off-center2"></span></a>
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Redo" data-content="Redo the most recently undone change"><span class="glyphicon glyphicon-share-alt off-center"></span></a>
</div>
</div>
<div class="col-xs-3" style="width: 18.5%">
<div class="btn-group btn-group-justified" role="toolbar">
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Rotate Left" data-content="Rotate the map left by 90 degrees"><span class="glyphicon glyphicon-flipped glyphicon-retweet off-center2"></span></a>
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Rotate Right" data-content="Rotate the map right by 90 degrees"><span class="glyphicon glyphicon-retweet off-center2"></span></a>
</div>
</div>
<div class="col-xs-3" style="width: 18.5%">
<div class="btn-group btn-group-justified" role="toolbar">
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Flip Vertical" data-content="Flip the map vertically across the x-axis"><span class="glyphicon glyphicon-sort off-center"></span></a>
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Flip Horizontal" data-content="Flip the map horizontally across the y-axis"><span class="glyphicon glphyicon-flipped glyphicon-sort off-center2"></span></a>
</div>
</div>
<div class="col-xs-3" style="width: 18.5%">
<div class="btn-group btn-group-justified" role="toolbar">
<a class="btn btn-default" data-toggle="popover" data-container="#instructions" data-placement="top" data-trigger="hover focus" title="Mirror Map" data-content="Allows you to mirror the map along its top, bottom, left, or right edge"><span class="glyphicon glyphicon-rotate-right glyphicon-sound-stereo"></span> / <span class="glyphicon glyphicon-sound-stereo"></span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingFour" data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
<h5 class="panel-title">
<a>Saving and Loading a Saved Map</a>
</h5>
</div>
<div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">
<div class="panel-body">
<p>While editing, your map will auto-save to cache every so often as you make changes. Maps are also automatically saved when leaving the page or when refreshed. In addition to the default map saving, there are 3 slots to save maps to. Maps slots can only be saved to manually and are great for working on multiple projects at once.</p>
</div>
</div>
</div>
<br>
<h4>Happy map making!</h4>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal" id="resizeDialog" tabindex="-1" role="dialog" aria-labelledby="resizeLabel" aria-hidden="true">
<div class="vertical-alignment-helper">
<div class="modal-dialog modal-sm vertical-align-center">
<div class="modal-content">
<div class="modal-header modal-colored-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="resizeLabel">Resize Map</h4>
</div>
<div class="modal-body" style="text-align: center;">
<table>
<tr>
<td></td>
<td style='text-align:center'>
<a id="resizeAnchorTop" class="btn btn-xs btn-default" title="Extend/Shrink Up"><span class="glyphicon glyphicon-arrow-up"></span></a>
</td>
<td></td>
</tr>
<tr>
<td>
<a id="resizeAnchorLeft" class="btn btn-xs btn-default" title="Extend/Shrink Left"><span class="glyphicon glyphicon-arrow-left"></span></a>
</td>
<td style='text-align:center'>
</td>
<td>
<a id="resizeAnchorRight" class="btn btn-xs btn-default" title="Extend/Shrink Right"><span class="glyphicon glyphicon-arrow-right"></span></a>
</td>
</tr>
<tr>
<td></td>
<td style='text-align:center'>
<a id="resizeAnchorBottom" class="btn btn-xs btn-default" title="Extend/Shrink Down"><span class="glyphicon glyphicon-arrow-down"></span></a>
</td>
<td></td>
</tr>
</table><br>
<div>
Width: <input type='number' id='resizeWidthTo' style='width:4em' />   Height: <input type='number' id='resizeHeightTo' style='width:4em' />
</div>
<div class="modal-footer">
<button id="resizeSubmit" type="button" class="btn btn-primary" data-dismiss="modal">Resize</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal" id="spawnOptions" tabindex="-1" role="dialog" aria-labelledby="spawnLabel" aria-hidden="true">
<div class="vertical-alignment-helper">
<div class="modal-dialog modal-sm vertical-align-center">
<div class="modal-content">
<div class="modal-header modal-colored-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="spawnLabel">Spawn Point</h4>
</div>
<div class="modal-body" style="text-align: center;">
<div>
Spawn Radius: <input type='text' id='spawnRadius' style='width:4em' />
</div><br>
<div>
Spawn Weight: <input type='text' id='spawnWeight' style='width:4em' />
</div><br>
<div id="spawnAll" style="text-align: left;">
<label class="radioLabel" style="width: auto">
<input type='radio' name="spawnType" value="all" checked/> Change all spawn points<br>
</label>
<label class="radioLabel" style="width: auto">
<input type='radio' name="spawnType" value="default"/> Change only unmodified spawn points
</label>
</div>
</div>
<div class="modal-footer">
<button id="spawnSubmit" type="button" class="btn btn-primary" data-dismiss="modal">Save</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal" id="portalOptions" tabindex="-1" role="dialog" aria-labelledby="portalLabel" aria-hidden="true">
<div class="vertical-alignment-helper">
<div class="modal-dialog modal-sm vertical-align-center">
<div class="modal-content">
<div class="modal-header modal-colored-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="portalLabel">Portal</h4>
</div>
<div class="modal-body" style="text-align: center;">
<div style="text-align: left;">
Choose the portal cooldown time in milliseconds.
</div><br>
<div>
Cooldown: <input type='number' min='0' id='portalCooldown' style='width:6em' />
</div><br>
<div id="portalAll" style="text-align: left;">
<label class="radioLabel" style="width: auto">
<input type='radio' name="portalType" value="all" checked/> Change all portals<br>
</label>
<label class="radioLabel" style="width: auto">
<input type='radio' name="portalType" value="default"/> Change only unmodified portals
</label>
</div>
</div>
<div class="modal-footer">
<button id="portalSubmit" type="button" class="btn btn-primary" data-dismiss="modal">Save</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal" id="switchOptions" tabindex="-1" role="dialog" aria-labelledby="switchLabel" aria-hidden="true">
<div class="vertical-alignment-helper">
<div class="modal-dialog modal-sm vertical-align-center">
<div class="modal-content">
<div class="modal-header modal-colored-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="switchLabel">Button</h4>
</div>
<div class="modal-body" style="text-align: center;">
<div style="text-align: left;">
Choose the button timer time in seconds.
</div><br>
<div>
Timer: <input type='number' min='0' id='switchTimer' style='width:4em' />
</div><br>
<div id="switchAll" style="text-align: left;">
<label class="radioLabel" style="width: auto">
<input type='radio' name="switchType" value="all" checked/> Change all buttons<br>
</label>
<label class="radioLabel" style="width: auto">
<input type='radio' name="switchType" value="default"/> Change only unmodified buttons
</label>
</div>
</div>
<div class="modal-footer">
<button id="switchSubmit" type="button" class="btn btn-primary" data-dismiss="modal">Save</button>
</div>
</div>
</div>
</div>
</div>
<div class="modal" id="mirrorOptions" tabindex="-1" role="dialog" aria-labelledby="mirrorLabel" aria-hidden="true">
<div class="vertical-alignment-helper">
<div class="modal-dialog modal-sm vertical-align-center">
<div class="modal-content">
<div class="modal-header modal-colored-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="mirrorLabel">Mirror Map</h4>
</div>
<div class="modal-body" style="text-align: center;">
<div style="text-align: left;">
Pick a direction to mirror in:
</div><br>
<table>
<tr>
<td></td>
<td style='text-align:center'>
<a id="mirrorAnchorTop" class="btn btn-xs btn-default mirror-dir" title="Mirror Up" value="[0,-1]"><span class="glyphicon glyphicon-arrow-up"></span></a>
</td>
<td></td>
</tr>
<tr>
<td>
<a id="mirrorAnchorLeft" class="btn btn-xs btn-default mirror-dir" title="Mirror Left" value="[-1,0]"><span class="glyphicon glyphicon-arrow-left"></span></a>
</td>
<td style='text-align:center'>
</td>
<td>
<a id="mirrorAnchorRight" class="btn btn-xs btn-default mirror-dir" title="Mirror Right" value="[-2,0]"><span class="glyphicon glyphicon-arrow-right"></span></a>
</td>
</tr>
<tr>
<td></td>
<td style='text-align:center'>
<a id="mirrorAnchorBottom" class="btn btn-xs btn-default mirror-dir" title="Mirror Down" value="[0,-2]"><span class="glyphicon glyphicon-arrow-down"></span></a>
</td>
<td></td>
</tr>
</table>
</div>
<div class="modal-footer">
<button id="mirrorSubmit" type="button" class="btn btn-primary" data-dismiss="modal">Mirror</button>
</div>
</div>
</div>
</div>
</div>
<div id="alerts" style="display: table; position: absolute; width: 33%; top: 20px; margin: auto; left: 0px; right: 0px; z-index: 2000;"></div>
<script type="text/javascript" src="map.js"></script>
</body></html>