-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
150 lines (143 loc) · 6.72 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
<!DOCTYPE HTML>
<html lang="en">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="src/voxelviewer.js" type="module"></script>
<script src="src/documentManager.js"></script>
<link rel="stylesheet" href="page/style.css" type="text/css">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Picross</title>
</head>
<body>
<canvas width="50" height="50" id="textRender" style="display:none"></canvas>
<!-- Slicer -->
<div id="slicer">
</div>
<!-- Action buttons -->
<div class="option_buttons_holder" id="puzzle_viewer">
<button class="option_button" onclick="showMenu('guide')">Help</button>
<button class="option_button" onclick="showMenu('shortcuts')">Shortcuts</button>
<button class="option_button" onclick="openGameMode('exit')"><u>E</u>xit</button>
<div class="sandbox">
<button class="option_button" onclick="action.copy()">Cop<u>y</u></button>
<button class="option_button" onclick="action.paste()"><u>P</u>aste</button>
</div>
<div class="creator">
<button class="option_button"
onclick="showMenu('metadata');$('#metadata_inputs').html(generateMetaInputs());"><u>F</u>inish
puzzle</button>
</div>
<div class="player">
<button class="option_button" onclick="action.deleteZeroes()">Des<u>t</u>roy
zeroes</button>
</div>
<div class="solver">
<button class="option_button" onclick="action.solve()">S<u>o</u>lve</button>
</div>
</div>
<div id="error" class="message"></div>
<div id="message" class="message"></div>
<!-- Menus -->
<div id="main_menu">
<div class="menu_page" id="main" style="display:block">
<button onclick="openGameMode('player');" tabindex="2">Play</button>
<button onclick="openGameMode('creator');" tabindex="3">Create</button>
<button onclick="openGameMode('solver');" tabindex="4">Solve</button>
<button onclick="showMenu('guide')" tabindex="7">Guide/Info</button>
</div>
<div class="menu_page" id="puzzle_enteror">
<button tabindex="1" class="menu_close" onclick="showMenu('main')">×</button>
<div class="creator">
<label for="puzzle_data">Duplicate from text:</label><br>
</div>
<div class="solver player">
<label for="puzzle_data">Enter puzzle data:</label><br>
</div>
<input type="text" id="puzzle_data" placeholder="eJxzSizOTFYoKK..." tabindex="101"
oninput="setTimeout(action.set)">
<button onclick="$('#puzzle_data').val('')">×</button>
<button onclick="navigator.clipboard.readText().then(str=>{$('#puzzle_data').val(str);action.set()})">Paste</button>
<!-- Difficulty enteror -->
<div class="player">
<input type="range" step="1" value="4" max="10" min="0" size="20" id="puzzle_difficulty"
oninput="action.diffInput();">
<div>
Estimated time: <span id="estimated_puzzle_time"></span>
</div>
</div>
<!-- Axis size lists-->
<div class="creator solver">
<br><br>
OR
<br><br>
<table style="display:inline-block">
<thead>
<tr>
<td><label for="puzzle_dimension">Dimensions: </label></td>
<td><input type="number" min="1" placeholder="3" max="10"
oninput="updateAxisSizeList();" id="puzzle_dimension" tabindex="105">
</td>
</thead>
<tbody id="axis_size_list">
</tbody>
</table>
<br>
<br>
</div>
<button onclick="action.open();" tabindex="130">Start</button>
</div>
<div class="menu_page" id="guide">
<button tabindex="1" class="menu_close" onclick="showMenu('main')">×</button>
<iframe id="guide_iframe" data-src="guide/index.html"></iframe>
</div>
<div class="menu_page" id="settings">
<button tabindex="1" class="menu_close" onclick="showMenu('main')">×</button>
</div>
<div class="menu_page" id="shortcuts">
<button tabindex="1" class="menu_close" onclick="showMenu('none')">×</button>
<div class="sandbox creator player">
<p>Underlined characters in the upper-right buttons are their shortcut</p>
<h3>Universal</h3>
Ctrl+click Destroy block
Shift+click Color block
WASD Control slicer
XYZ Set dimension
Escape key Close menu
E Exit
</div>
<div class="player">
<h3>Player</h3>
T Des<u>t</u>roy Zeroes
</div>
<div class="sandbox">
<h3>Sandbox</h3>
Y Cop<u>y</u>
P Paste
</div>
<div class="creator">
<h3>Creator</h3>
F Finish puzzle
</div>
<div class="solver">
<h3>Solver</h3>
0-9 Set hint's total
Shift+(1-9) Set hint's pieces
+ Increase hint total
- Decrease hint total
[ Increase hint pieces
] Decrease hint pieces
O S<u>o</u>lve
</div>
</div>
<div class="menu_page" id="metadata">
<button tabindex="1" class="menu_close" onclick="showMenu('none')">×</button>
<span id="metadata_inputs">
</span>
<br>
<button onclick="action.finish(false)">Copy puzzle</button>
<button onclick="action.finish(true)">Copy as URL</button>
</div>
</div>
<canvas id="canvas"></canvas>
</body>
</html>