make 'never'/'always' clickable

This commit is contained in:
synth-ruiner 2018-01-26 19:26:53 +00:00
parent 68052f4636
commit 6e14842500
4 changed files with 11 additions and 4 deletions

View File

@ -452,6 +452,14 @@ $(document).ready(function() {
renderThrottled(); renderThrottled();
}); });
$('#never').on('click touchend', function() {
$('#threshold').val(0).change();
});
$('#always').on('click touchend', function() {
$('#threshold').val(64).change();
});
$('#save').on('click touchend', function() { $('#save').on('click touchend', function() {
var newGameData = $('textarea').val(); var newGameData = $('textarea').val();

View File

@ -5229,4 +5229,4 @@ DLG ITM_0
You found a nice warm cup of tea You found a nice warm cup of tea
VAR a VAR a
42</textarea></div><div class="section" id="image"><h2>image</h2><div id="croppie"></div><input id="imageUpload" type="file" accepts="image/*"></div><div class="section" id="palette"><h2>palette</h2><form id="palettes"><table><tbody></tbody></table></form></div><div class="section" id="crop"><h2>preview</h2><canvas id="preview" width="128" height="128"></canvas><input id="brightness" type="range" min="-255" max="255" value="0"><label for="brightness">brightness</label><br><br><label>never </label><input id="threshold" type="range" min="0" max="64" value="0"><label> always</label><br><label for="threshold">create new tiles</label></div><div class="section" id="output"><h2>output</h2><canvas id="room-output" width="128" height="128"></canvas><input id="roomName" type="text" placeholder="room name"><button id="save">write to game data</button></div></body></html> 42</textarea></div><div class="section" id="image"><h2>image</h2><div id="croppie"></div><input id="imageUpload" type="file" accepts="image/*"></div><div class="section" id="palette"><h2>palette</h2><form id="palettes"><table><tbody></tbody></table></form></div><div class="section" id="crop"><h2>preview</h2><canvas id="preview" width="128" height="128"></canvas><input id="brightness" type="range" min="-255" max="255" value="0"><label for="brightness">brightness</label><br><br><label id="never">never </label><input id="threshold" type="range" min="0" max="64" value="0"><label id="always"> always</label><br><label for="threshold">create new tiles</label><br></div><div class="section" id="output"><h2>output</h2><canvas id="room-output" width="128" height="128"></canvas><input id="roomName" type="text" placeholder="room name"><button id="save">write to game data</button></div></body></html>

View File

@ -61,9 +61,9 @@ html
br br
br br
label never label#never never
input#threshold(type="range" min=0 max=64 value=0) input#threshold(type="range" min=0 max=64 value=0)
label always label#always always
br br
label(for="threshold") create new tiles label(for="threshold") create new tiles
br br

View File

@ -54,7 +54,6 @@ if (src.match(/^(file|https)?:\/\/|^\/\//)) {
* animate animated tiles * animate animated tiles
* profile script performance and optimise where most needed * profile script performance and optimise where most needed
* make brightness slider trigger redraw every so often while being dragged, instead of waiting until drag stop * make brightness slider trigger redraw every so often while being dragged, instead of waiting until drag stop
* make 'never'/'always' clickable
## could do ## could do