moved the suppress buy aug confirmation to settings, will now persist

This commit is contained in:
Olivier Gagnon
2018-06-21 13:32:21 -04:00
parent 18d4e2bd2a
commit 15b0c11731
3 changed files with 41 additions and 32 deletions
+22 -13
View File
@@ -2,19 +2,20 @@ import {Engine} from "./engine.js";
/* Settings.js */
let Settings = {
CodeInstructionRunTime: 50,
MaxLogCapacity: 50,
MaxPortCapacity: 50,
SuppressMessages: false,
SuppressFactionInvites: false,
SuppressTravelConfirmation: false,
AutosaveInterval: 60,
DisableHotkeys: false,
ThemeHighlightColor: "#ffffff",
ThemeFontColor: "#66ff33",
ThemeBackgroundColor: "#000000",
EditorTheme: "Monokai",
EditorKeybinding: "ace",
CodeInstructionRunTime: 50,
MaxLogCapacity: 50,
MaxPortCapacity: 50,
SuppressMessages: false,
SuppressFactionInvites: false,
SuppressTravelConfirmation: false,
SuppressBuyAugmentationConfirmation: false,
AutosaveInterval: 60,
DisableHotkeys: false,
ThemeHighlightColor: "#ffffff",
ThemeFontColor: "#66ff33",
ThemeBackgroundColor: "#000000",
EditorTheme: "Monokai",
EditorKeybinding: "ace",
}
function loadSettings(saveString) {
@@ -28,6 +29,7 @@ function initSettings() {
Settings.SuppressMessages = false;
Settings.SuppressFactionInvites = false;
Settings.SuppressTravelConfirmation = false,
Settings.SuppressBuyAugmentationConfirmation = false,
Settings.AutosaveInterval = 60;
Settings.DisableHotkeys = false;
}
@@ -39,6 +41,7 @@ function setSettingsLabels() {
var suppressMsgs = document.getElementById("settingsSuppressMessages");
var suppressFactionInv = document.getElementById("settingsSuppressFactionInvites")
var suppressTravelConfirmation = document.getElementById("settingsSuppressTravelConfirmation");
var suppressBuyAugmentationConfirmation = document.getElementById("settingsSuppressBuyAugmentationConfirmation");
var autosaveInterval = document.getElementById("settingsAutosaveIntervalValLabel");
var disableHotkeys = document.getElementById("settingsDisableHotkeys");
@@ -49,6 +52,7 @@ function setSettingsLabels() {
suppressMsgs.checked = Settings.SuppressMessages;
suppressFactionInv.checked = Settings.SuppressFactionInvites;
suppressTravelConfirmation.checked = Settings.SuppressTravelConfirmation;
suppressBuyAugmentationConfirmation.checked = Settings.SuppressBuyAugmentationConfirmation;
autosaveInterval.innerHTML = Settings.AutosaveInterval;
disableHotkeys.checked = Settings.DisableHotkeys;
@@ -99,6 +103,11 @@ function setSettingsLabels() {
Settings.SuppressTravelConfirmation = this.checked;
};
suppressBuyAugmentationConfirmation.onclick = function() {
Settings.SuppressBuyAugmentationConfirmation = this.checked;
console.log('sup buy: '+Settings.SuppressBuyAugmentationConfirmation);
};
disableHotkeys.onclick = function() {
Settings.DisableHotkeys = this.checked;
}