Steam mod compatibility
This commit is contained in:
parent
52bd38f784
commit
188a693521
|
|
@ -2,9 +2,15 @@ pixelResizeButton = document.createElement("button");
|
||||||
pixelResizeButton.onclick = function(pixel) {
|
pixelResizeButton.onclick = function(pixel) {
|
||||||
let canvas_width = document.getElementById("game").width;
|
let canvas_width = document.getElementById("game").width;
|
||||||
let canvas_height = document.getElementById("game").height;
|
let canvas_height = document.getElementById("game").height;
|
||||||
let pixelSizeNeeded = prompt("How big should pixels be?");
|
promptInput("How big should pixels be?", (pixelSizeNeeded) => {
|
||||||
if (!pixelSizeNeeded || isNaN(pixelSizeNeeded)) { alert('number is invalid!'); return; }
|
// let pixelSizeNeeded = prompt("How big should pixels be?");
|
||||||
|
if (!pixelSizeNeeded || isNaN(pixelSizeNeeded)) {
|
||||||
|
// alert('number is invalid!');
|
||||||
|
promptText("Number is invalid!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
resizeCanvas(canvas_height,canvas_width, parseFloat(pixelSizeNeeded), true);
|
resizeCanvas(canvas_height,canvas_width, parseFloat(pixelSizeNeeded), true);
|
||||||
|
},"Pixel Size")
|
||||||
};
|
};
|
||||||
pixelResizeButton.textContent = "Resize";
|
pixelResizeButton.textContent = "Resize";
|
||||||
window.addEventListener("load",function(){
|
window.addEventListener("load",function(){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue