mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Use slider for choosing FPS
This commit is contained in:
parent
ddd6b45f9c
commit
6d2b1944fa
@ -134,6 +134,10 @@ ul, li {
|
|||||||
margin : 5px;
|
margin : 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#preview-fps {
|
||||||
|
width : 200px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Force apparition of scrollbars on leopard */
|
/* Force apparition of scrollbars on leopard */
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
<div class="canvas-background"></div>
|
<div class="canvas-background"></div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>Preview FPS:</label><input id="preview-fps" type="text" value="12" />
|
<input id="preview-fps" type="range" min="1" max="24" value="12" style="width:200px;"/>
|
||||||
|
<span id="display-fps">12 fps</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -149,7 +149,7 @@
|
|||||||
};
|
};
|
||||||
var refreshUpdater = startPreviewRefresh();
|
var refreshUpdater = startPreviewRefresh();
|
||||||
|
|
||||||
animFPSTuner.addEventListener('keyup', function(evt) {
|
animFPSTuner.addEventListener('change', function(evt) {
|
||||||
window.clearInterval(refreshUpdater);
|
window.clearInterval(refreshUpdater);
|
||||||
animPreviewFPS = parseInt(animFPSTuner.value, 10);
|
animPreviewFPS = parseInt(animFPSTuner.value, 10);
|
||||||
if(isNaN(animPreviewFPS)) {
|
if(isNaN(animPreviewFPS)) {
|
||||||
@ -167,6 +167,7 @@
|
|||||||
if(animPreviewFPS > 100) {
|
if(animPreviewFPS > 100) {
|
||||||
animPreviewFPS = 100;
|
animPreviewFPS = 100;
|
||||||
}
|
}
|
||||||
|
$("display-fps").innerHTML = animPreviewFPS + " fps";
|
||||||
animFPSTuner.value = animPreviewFPS;
|
animFPSTuner.value = animPreviewFPS;
|
||||||
refreshUpdater = startPreviewRefresh();
|
refreshUpdater = startPreviewRefresh();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user