Ok I have made a mess of this. I have several buttons but only want to make the blue print button disappear. Started to change the code but now the buttons are not working correctly, as in when I go to the stat screen I can click on the other buttons and nothing happens now. Or They just do not function at all after the first page. If someone could point out where I am making my error it would be greatly welcome. Thanks you all, with out you this project would have died long ago.
index file
`
Group info Weapons BlueprintsShow Blue Prints
`ui file
`
function showStats1() {
if (window.showingStatsAlready) return;
window.showingStatsAlready = true;
document.getElementById(“statsButton1”).style.display = “none”;
document.getElementById(“statsButton2”).style.display = “inline”;
document.getElementById(“statsButton3”).style.display = “inline”;
main.innerHTML = “
var currentScene = window.stats.scene;
var scene = new Scene("stats_scene_1", window.stats, this.nav);
scene.save = function(callback) {if (callback) callback.call(scene);}; // Don't save state in stats screen, issue #70
// TODO ban *choice/*page_break/etc. in stats screen
scene.finish = scene.autofinish = function(buttonName) {
this.finished = true;
this.paragraph();
var p = document.createElement("p");
var restartLink = document.createElement("a");
restartLink.setAttribute("style", "text-decoration: underline; cursor: pointer; text-align: left");
restartLink.onclick = function() {
if (window.confirm("Restart your game? Did you click that intentionally?")) {
window.showingStatsAlready = false;
document.getElementById("statsButton1").style.display = "inline";
clearCookie(function() {
window.nav.resetStats(window.stats);
clearScreen(restoreGame);
}, "");
}
return false;
}
restartLink.innerHTML = "Start Over from the Beginning";
p.appendChild(restartLink);
var text = document.getElementById('text');
text.appendChild(p);
printButton(buttonName || "Fat", main, false, function() {
window.stats.scene = currentScene;
document.getElementById("statsButton1").style.display = "inline";
clearScreen(loadAndRestoreGame);
});
}
scene.execute();
}
function showStats2() {
if (window.showingStatsAlready) return;
window.showingStatsAlready = true;
document.getElementById(“statsButton2”).style.display = “none”;
document.getElementById(“statsButton1”).style.display = “inline”;
document.getElementById(“statsButton3”).style.display = “inline”;
main.innerHTML = “
var currentScene = window.stats.scene;
var scene = new Scene("stats_scene_2", window.stats, this.nav);
scene.save = function(callback) {if (callback) callback.call(scene);}; // Don't save state in stats screen, issue #70
// TODO ban *choice/*page_break/etc. in stats screen
scene.finish = scene.autofinish = function(buttonName) {
this.finished = true;
this.paragraph();
var p = document.createElement("p");
var restartLink = document.createElement("a");
restartLink.setAttribute("style", "text-decoration: underline; cursor: pointer; text-align: left");
restartLink.onclick = function() {
if (window.confirm("Restart your game? Did you click that intentionally?")) {
window.showingStatsAlready = false;
document.getElementById("statsButton2").style.display = "inline";
clearCookie(function() {
window.nav.resetStats(window.stats);
clearScreen(restoreGame);
}, "");
}
return false;
}
restartLink.innerHTML = "Start Over from the Beginning";
p.appendChild(restartLink);
var text = document.getElementById('text');
text.appendChild(p);
printButton(buttonName || "Fat", main, false, function() {
window.stats.scene = currentScene;
document.getElementById("statsButton1").style.display = "inline";
clearScreen(loadAndRestoreGame);
});
}
scene.execute();
}
function showStats3() {
if (window.showingStatsAlready) return;
window.showingStatsAlready = true;
document.getElementById(“statsButton3”).style.display = “none”;
document.getElementById(“statsButton1”).style.display = “inline”;
document.getElementById(“statsButton2”).style.display = “inline”;
main.innerHTML = “
var currentScene = window.stats.scene;
var scene = new Scene("stats_scene_3", window.stats, this.nav);
scene.save = function(callback) {if (callback) callback.call(scene);}; // Don't save state in stats screen, issue #70
// TODO ban *choice/*page_break/etc. in stats screen
scene.finish = scene.autofinish = function(buttonName) {
this.finished = true;
this.paragraph();
var p = document.createElement("p");
var restartLink = document.createElement("a");
restartLink.setAttribute("style", "text-decoration: underline; cursor: pointer; text-align: left");
restartLink.onclick = function() {
if (window.confirm("Restart your game? Did you click that intentionally?")) {
window.showingStatsAlready = false;
document.getElementById("statsButton3").style.display = "inline";
clearCookie(function() {
window.nav.resetStats(window.stats);
clearScreen(restoreGame);
}, "");
}
return false;
}
restartLink.innerHTML = "Start Over from the Beginning";
p.appendChild(restartLink);
var text = document.getElementById('text');
text.appendChild(p);
printButton(buttonName || "Fat", main, false, function() {
window.stats.scene = currentScene;
document.getElementById("statsButton1").style.display = "inline";
clearScreen(loadAndRestoreGame);
});
}
scene.execute();
}
`