quickload pause toggle
This commit is contained in:
parent
3131472a3d
commit
7dec7bfcd0
|
|
@ -192,6 +192,9 @@ try {
|
||||||
if(pause) {
|
if(pause) {
|
||||||
paused = true;
|
paused = true;
|
||||||
document.getElementById("pauseButton").setAttribute("on","true");
|
document.getElementById("pauseButton").setAttribute("on","true");
|
||||||
|
} else {
|
||||||
|
paused = false;
|
||||||
|
document.getElementById("pauseButton").setAttribute("on","false");
|
||||||
};
|
};
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
@ -433,6 +436,7 @@ try {
|
||||||
statsDiv.innerHTML = stats;
|
statsDiv.innerHTML = stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quickloadIsPaused = true;
|
||||||
//Element-based quicksave toggle has proven impossible due to numerous irreparable illogic incidents, so have some buttons instead
|
//Element-based quicksave toggle has proven impossible due to numerous irreparable illogic incidents, so have some buttons instead
|
||||||
var qsb = document.createElement("button");
|
var qsb = document.createElement("button");
|
||||||
qsb.setAttribute("id","quicksaveButton");
|
qsb.setAttribute("id","quicksaveButton");
|
||||||
|
|
@ -442,9 +446,21 @@ try {
|
||||||
qsb.after(document.createTextNode(String.fromCharCode(160)));
|
qsb.after(document.createTextNode(String.fromCharCode(160)));
|
||||||
var qlb = document.createElement("button");
|
var qlb = document.createElement("button");
|
||||||
qlb.setAttribute("id","quickloadButton");
|
qlb.setAttribute("id","quickloadButton");
|
||||||
qlb.setAttribute("onclick","clearAll(); quickload()");
|
qlb.setAttribute("onclick","clearAll(); quickload(quickloadIsPaused ?? true)");
|
||||||
qlb.innerText = "Quickload";
|
qlb.innerText = "Quickload";
|
||||||
document.getElementById("gameDiv").before(qlb);
|
document.getElementById("gameDiv").before(qlb);
|
||||||
|
qlb.after(document.createTextNode(String.fromCharCode(160,160)));
|
||||||
|
var qpc = document.createElement("input");
|
||||||
|
qpc.setAttribute("type","checkbox");
|
||||||
|
qpc.setAttribute("id","quickloadPausedInput");
|
||||||
|
qpc.setAttribute("onchange","quickloadIsPaused = this.checked;");
|
||||||
|
qpc.checked = true;
|
||||||
|
var qpcd = document.createElement("span");
|
||||||
|
qpcd.setAttribute("id","quickloadPausedInputLabel");
|
||||||
|
qpcd.innerText = "Pause after quickloading?";
|
||||||
|
document.getElementById("gameDiv").before(qpc);
|
||||||
|
qpc.after(document.createTextNode(String.fromCharCode(160)));
|
||||||
|
document.getElementById("gameDiv").before(qpcd);
|
||||||
document.getElementById("gameDiv").before(document.createElement("br"));
|
document.getElementById("gameDiv").before(document.createElement("br"));
|
||||||
|
|
||||||
quickSlDetectorLastKeys = [];
|
quickSlDetectorLastKeys = [];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue