diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 9b0fa3c3..2fc2723a 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -205,11 +205,15 @@ export const allApplicationSettings = [ /** @type {Array} */ export const allDebugSettings = []; for (const k in globalConfig.debug) { - if (!IS_DEBUG) break; allDebugSettings.push( - new BoolSetting("debug_" + k, categoryDebug, (app, value) => { - if (globalConfig.debug.enableDebugSettings) globalConfig.debug[k] = value; - }) + new BoolSetting( + "debug_" + k, + categoryDebug, + (app, value) => { + if (globalConfig.debug.enableDebugSettings) globalConfig.debug[k] = value; + }, + IS_DEBUG + ) ); } allApplicationSettings.push(...allDebugSettings); diff --git a/src/js/states/settings.js b/src/js/states/settings.js index baa97c68..3d96901b 100644 --- a/src/js/states/settings.js +++ b/src/js/states/settings.js @@ -41,20 +41,20 @@ export class SettingsState extends TextualGameState { getSettingsHtml() { let lastCategory = null; let html = ""; - const hideDebug = IS_DEBUG ? "" : " style='display:none'"; for (let i = 0; i < allApplicationSettings.length; ++i) { const setting = allApplicationSettings[i]; - const hidden = allDebugSettings.indexOf(setting) != -1 && !globalConfig.debug.enableDebugSettings; if (setting.categoryId !== lastCategory) { lastCategory = setting.categoryId; + const isHidden = setting.categoryId == categoryDebug && !IS_DEBUG; + if (i !== 0) { html += ""; } - html += `${ + html += ``; - html += `
`; + html += `