mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
Default options
This commit is contained in:
parent
cbc15aaf52
commit
8473e8922b
2 changed files with 13 additions and 0 deletions
|
@ -2172,6 +2172,7 @@ class EmulatorJS {
|
|||
this.settings[title] = newValue;
|
||||
funcs.forEach(e => e(title));
|
||||
}
|
||||
let allOpts = {};
|
||||
|
||||
const addToMenu = (title, id, options, defaultOption) => {
|
||||
const menuOption = this.createElement("div");
|
||||
|
@ -2229,6 +2230,7 @@ class EmulatorJS {
|
|||
opts[options[i]] = options[i];
|
||||
}
|
||||
}
|
||||
allOpts[id] = opts;
|
||||
|
||||
funcs.push((title) => {
|
||||
if (id !== title) return;
|
||||
|
@ -2331,6 +2333,16 @@ class EmulatorJS {
|
|||
nested.style.height = homeSize.height + "px";
|
||||
|
||||
this.settingsMenu.style.display = "none";
|
||||
|
||||
if (this.debug) {
|
||||
console.log("Available core options", allOpts);
|
||||
}
|
||||
|
||||
if (this.config.defaultOptions) {
|
||||
for (const k in this.config.defaultOptions) {
|
||||
this.changeSettingOption(k, this.config.defaultOptions[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
createSubPopup(hidden) {
|
||||
const popup = this.createElement('div');
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
config.loadState = window.EJS_loadStateURL;
|
||||
config.cacheLimit = window.EJS_CacheLimit;
|
||||
config.cheats = window.EJS_cheats;
|
||||
config.defaultOptions = window.EJS_defaultOptions;
|
||||
|
||||
if (typeof window.EJS_language === "string" && window.EJS_language !== "en-US") {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue