-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
393 lines (374 loc) · 20.9 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Kula Workshop Level Editor</title>
<meta name="author" content="Murphy and SaturnKai">
<meta name="description" content="Create and edit levels from and for Kula World.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="menu">
<div id="menu-bar">
<div class="menu-left">
<div class="level-settings">
<button class="menu-icon" id="export" title="Export Level"><img src="ui/Export.png" alt="Export Level"></button>
<button class="menu-icon" id="open" title="Open Level"><img src="ui/Open.png" alt="Open Level"></button>
<button class="menu-icon" id="options" title="Level Options"><img src="ui/Options.png" alt="Level Options"></button>
</div>
<div class="block-ops">
<button class="menu-icon" id="add" title="Add Block"><img src="ui/AddBlock.png" alt="Add Block"></button>
<button class="menu-icon" id="remove" title="Remove Block"><img src="ui/RemoveBlock.png" alt="Remove Block"></button>
</div>
<div class="block-types">
<button class="menu-icon" id="regular" title="Regular Block"><img src="ui/Regular.png" alt="Regular Block"></button>
<button class="menu-icon" id="fire" title="Fire Block"><img src="ui/Fire.png" alt="Fire Block"></button>
<button class="menu-icon" id="ice" title="Ice Block"><img src="ui/Ice.png" alt="Ice Block"></button>
<button class="menu-icon" id="invisible" title="Invisible Block"><img src="ui/Invisible.png" alt="Invisible Block"></button>
<button class="menu-icon" id="acid" title="Acid Block"><img src="ui/Acid.png" alt="Acid Block"></button>
</div>
</div>
<div class="menu-right">
<div class="bound-styles">
<button class="menu-icon" id="show-bounds" title="Bounds Visible"><img src="ui/Bounds.png" alt="Bounds Visible"></button>
<button class="menu-icon" id="selection-bounds" title="Bounds Toggled"><img src="ui/SelectionBounds.png" alt="Bounds Toggled"></button>
<button class="menu-icon" id="no-bounds" title="Bounds Off"><img src="ui/NoBounds.png" alt="Bounds Off"></button>
</div>
<div class="theme-styles">
<button class="menu-icon" id="hiro" title="Hiro Theme" class="selected"><img src="ui/Hiro.png" alt="Hiro Theme"></button>
<button class="menu-icon" id="hills" title="Hills Theme"><img src="ui/Hills.png" alt="Hills Theme"></button>
<button class="menu-icon" id="inca" title="Inca Theme"><img src="ui/Inca.png" alt="Inca Theme"></button>
<button class="menu-icon" id="arctic" title="Arctic Theme"><img src="ui/Arctic.png" alt="Arctic Theme"></button>
<button class="menu-icon" id="cowboy" title="Cowboy Theme"><img src="ui/Cowboy.png" alt="Cowboy Theme"></button>
<button class="menu-icon" id="field" title="Field Theme"><img src="ui/Field.png" alt="Field Theme"></button>
<button class="menu-icon" id="atlantis" title="Atlantis Theme"><img src="ui/Atlantis.png" alt="Atlantis Theme"></button>
<button class="menu-icon" id="haze" title="Haze Theme"><img src="ui/Haze.png" alt="Haze Theme"></button>
<button class="menu-icon" id="mars" title="Mars Theme"><img src="ui/Mars.png" alt="Mars Theme"></button>
<button class="menu-icon" id="hell" title="Hell Theme"><img src="ui/Hell.png" alt="Hell Theme"></button>
</div>
<div class="external">
<a class="menu-icon" href="https://github.com/KulaWorkshop/LevelEditor" target="_blank" title="Github Page">
<img src="ui/Github.png">
</a>
</div>
</div>
<input type="file" id="browse" style="display: none;">
</div>
<div id="block-bar" style="display: none;">
<div class="block-selection">
<div class="block" id="block-type">
<p>Block</p>
<div><img height="64" style="display: none;"></div>
<select id="edit-block-type">
<option value="0">Normal</option>
<option value="1">Fire</option>
<option value="2">Ice</option>
<option value="3">Invisible</option>
<option value="4">Acid</option>
<option value="5">Moving</option>
<option value="6">Crumbling</option>
<option value="7">Flashing</option>
<option value="8">Laser</option>
</select>
</div>
</div>
<div id="block-group">
<div class="block">
<p>Positive X</p>
<div class="selectable-item" id="selectPX"><img height="64" style="display: none;"></div>
<select id="editPX">
<option value="0">None</option>
</select>
</div>
<div class="block">
<p>Negative X</p>
<div class="selectable-item" id="selectNX"><img height="64" style="display: none;"></div>
<select id="editNX">
<option value="0">None</option>
</select>
</div>
<div class="block">
<p>Positive Y</p>
<div class="selectable-item" id="selectPY"><img height="64" style="display: none;"></div>
<select id="editPY">
<option value="0">None</option>
</select>
</div>
<div class="block">
<p>Negative Y</p>
<div class="selectable-item" id="selectNY"><img height="64" style="display: none;"></div>
<select id="editNY">
<option value="0">None</option>
</select>
</div>
<div class="block">
<p>Positive Z</p>
<div class="selectable-item" id="selectPZ"><img height="64" style="display: none;"></div>
<select id="editPZ">
<option value="0">None</option>
</select>
</div>
<div class="block">
<p>Negative Z</p>
<div class="selectable-item" id="selectNZ"><img height="64" style="display: none;"></div>
<select id="editNZ">
<option value="0">None</option>
</select>
</div>
</div>
<div id="option-group" style="display: flex;">
<div class="option moving-option" style="display: none;">
<p>Connect</p>
<div><img height="64" style="display: none;"></div>
<button id='edit-moving-connection'>Attach</button>
</div>
<div class="option moving-option" style="display: none;">
<p>Length</p>
<div><img height="64" style="display: none;"></div>
<select id="edit-moving-length">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
<div class="option moving-option" style="display: none;">
<p>Speed</p>
<div><img height="64" style="display: none;"></div>
<input id="edit-moving-speed" type="number" min="0" max="510" value="0"></option>
</div>
<div class="option flashing-option" style="display: none;">
<p>Timing</p>
<div><img height="64" style="display: none;"></div>
<select id="edit-flashing-index">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
<div class="option laser-option" style="display: none;">
<p>Connect</p>
<div><img height="64" style="display: none;"></div>
<button id='edit-laser-connection'>Attach</button>
</div>
<div class="option laser-option" style="display: none;">
<p>Color</p>
<div><img height="64" style="display: none;"></div>
<select id="edit-laser-color">
<option value="0">Yellow</option>
<option value="1">Blue</option>
<option value="2">Green</option>
<option value="3">Red</option>
</select>
</div>
<div class="option laser-option" style="display: none;">
<p>Enabled</p>
<div><img height="64" style="display: none;"></div>
<select id="edit-laser-enabled">
<option value="1">True</option>
<option value="0">False</option>
</select>
</div>
<div class="option laser-option" style="display: none;">
<p>Power</p>
<div><img height="64" style="display: none;"></div>
<button id='edit-laser-power'>Attach</button>
</div>
<div class="option transporter-option" style="display: none;">
<p>Connect</p>
<div><img height="64"></div>
<button id='edit-transporter-connection'>Attach</button>
</div>
<div class="option transporter-option" style="display: none;">
<p>Color</p>
<div><img height="64"></div>
<select id="edit-transporter-color">
<option value="0">Yellow</option>
<option value="1">Blue</option>
<option value="2">Green</option>
<option value="3">Red</option>
</select>
</div>
<div class="option transporter-option" style="display: none;">
<p>Enabled</p>
<div><img height="64"></div>
<select id="edit-transporter-enabled">
<option value="1">True</option>
<option value="2">False</option>
</select>
</div>
<div class="option transporter-option" style="display: none;">
<p>Rotation</p>
<div><img height="64"></div>
<select id="edit-transporter-rotation">
<option value="4">+X</option>
<option value="2">-X</option>
<option value="1">+Z</option>
<option value="3">-Z</option>
</select>
</div>
<div class="option transporter-option" style="display: none;">
<p>Power</p>
<div><img height="64"></div>
<button id='edit-transporter-power'>Attach</button>
</div>
<div class="option button-option" style="display: none;">
<p>Color</p>
<div><img height="64"></div>
<select id="edit-button-color">
<option value="0">Yellow</option>
<option value="1">Blue</option>
<option value="2">Green</option>
<option value="3">Red</option>
</select>
</div>
<div class="option button-option" style="display: none;">
<p>Enabled</p>
<div><img height="64"></div>
<select id="edit-button-enabled">
<option value="1">True</option>
<option value="2">False</option>
</select>
</div>
<div class="option button-option" style="display: none;">
<p>Power</p>
<div><img height="64"></div>
<button id='edit-button-power-1'>Attach</button>
</div>
<div class="option button-option" style="display: none;">
<p>Power</p>
<div><img height="64"></div>
<button id='edit-button-power-2'>Attach</button>
</div>
<div class="option moving-spike-option" style="display: none;">
<p>Timing</p>
<div style="background-image: url(./textures/tilesets/HIRO/MOVING_SPIKE_TILE.png);"><img height="64" style="display: none;"></div>
<select id="edit-moving-spike-index">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
<div class="option arrow-option" style="display: none;">
<p>Rotation</p>
<div><img height="64" style="display: inline;" src="sprites/28.png"></div>
<select id="edit-arrow-rotation">
<option value="4">+X</option>
<option value="2">-X</option>
<option value="1">+Z</option>
<option value="3">-Z</option>
</select>
</div>
<div class="option player-spawn-option" style="display: none;">
<p>Rotation</p>
<div><img height="64" style="display: inline;" src="sprites/30.png"></div>
<select id="edit-player-spawn-rotation">
<option value="4">+X</option>
<option value="2">-X</option>
<option value="1">+Z</option>
<option value="3">-Z</option>
</select>
</div>
<div class="option slow-star-option" style="display: none;">
<p>Rotation</p>
<div><img height="64" style="display: inline;" src="sprites/50.png"></div>
<select id="edit-slow-star-rotation">
<option value="4">+X</option>
<option value="2">-X</option>
<option value="1">+Z</option>
<option value="3">-Z</option>
</select>
</div>
<div class="option tire-option" style="display: none;">
<p>Rotation</p>
<div><img height="64" style="display: inline;" src="sprites/51.png"></div>
<select id="edit-tire-rotation">
<option value="4">+X</option>
<option value="2">-X</option>
<option value="1">+Z</option>
<option value="3">-Z</option>
</select>
</div>
<div class="option fast-star-option" style="display: none;">
<p>Rotation</p>
<div><img height="64" style="display: inline;" src="sprites/52.png"></div>
<select id="edit-fast-star-rotation">
<option value="4">+X</option>
<option value="2">-X</option>
<option value="1">+Z</option>
<option value="3">-Z</option>
</select>
</div>
<div class="option captivator-option" style="display: none;">
<p>Timing</p>
<div><img height="64" style="display: inline;" src="sprites/56.png"></div>
<select id="edit-captivator-index">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
</div>
</div>
<div id="level-options" class="popup">
<div class="popup-content">
<div class="popup-header">
<p>Level Options</p>
</div>
<div class="popup-body">
<input class="level-option" id="edit-level-time" type="number" min="0" max="510" value="99">Starting Level Time</option><br>
<input class="level-option" id="edit-secret-level" type="checkbox">Hidden Level</input><br>
<input class="level-option" id="edit-far" type="checkbox">Far Sighted Invisible Blocks</input>
</div>
</div>
</div>
<div id="block-side-selections" class="popup">
<div class="popup-content2">
<div class="popup-header">
<p>Select A Side</p>
</div>
<div class="popup-body2">
<div class="block">
<p style="text-decoration: underline; text-decoration-color: #F00;">Positive X</p>
<div class="selectable-item" id="selectPX"><img height="64"></div>
<button class="side-selection" id="select-side-px">Select</button>
</div>
<div class="block">
<p style="text-decoration: underline; text-decoration-color: #F00;">Negative X</p>
<div class="selectable-item" id="selectNX"><img height="64"></div>
<button class="side-selection" id="select-side-nx">Select</button>
</div>
<div class="block">
<p style="text-decoration: underline; text-decoration-color: #0F0;">Positive Y</p>
<div class="selectable-item" id="selectPY"><img height="64"></div>
<button class="side-selection" id="select-side-py">Select</button>
</div>
<div class="block">
<p style="text-decoration: underline; text-decoration-color: #0F0;">Negative Y</p>
<div class="selectable-item" id="selectNY"><img height="64"></div>
<button class="side-selection" id="select-side-ny">Select</button>
</div>
<div class="block">
<p style="text-decoration: underline; text-decoration-color: #00F;">Positive Z</p>
<div class="selectable-item" id="selectPZ"><img height="64"></div>
<button class="side-selection" id="select-side-pz">Select</button>
</div>
<div class="block">
<p style="text-decoration: underline; text-decoration-color: #00F;">Negative Z</p>
<div class="selectable-item" id="selectNZ"><img height="64"></div>
<button class="side-selection" id="select-side-nz">Select</button>
</div>
</div>
</div>
</div>
<div id="error-alert" class="alert" style="display: none;"><span class="alert-button">×</span></div>
<div id="success-alert" class="alert" style="display: none;"><span class="alert-button">×</span></div>
<div id="info-alert" class="alert" style="display: none;"><span class="alert-button">×</span></div>
<script src="editor.js" type="module"></script>
</body>
</html>