diff --git a/src/css/common.scss b/src/css/common.scss index d44d7f63..e3d8087e 100644 --- a/src/css/common.scss +++ b/src/css/common.scss @@ -438,7 +438,7 @@ canvas { text-transform: uppercase; } opacity: 0.6; - >* { + > * { opacity: 0.5 !important; } } @@ -479,7 +479,7 @@ canvas { flex-direction: column; justify-content: center; align-items: center; - >.bar { + > .bar { display: none; @include S(margin-top, 15px); width: 80vw; @@ -610,7 +610,7 @@ canvas { @include PlainText; @include S(border-radius, $globalBorderRadius); &, - >span { + > span { @include S(font-size, 9px); @include S(line-height, 11px); font-weight: bold !important; @@ -697,4 +697,4 @@ iframe { transform: translateY(2px); } } -} \ No newline at end of file +} diff --git a/src/js/platform/browser/sound.js b/src/js/platform/browser/sound.js index 84fcf948..e8a70158 100644 --- a/src/js/platform/browser/sound.js +++ b/src/js/platform/browser/sound.js @@ -211,4 +211,4 @@ export class SoundImplBrowser extends SoundInterface { deinitialize() { return super.deinitialize().then(() => Howler.unload()); } -} \ No newline at end of file +} diff --git a/src/js/platform/sound.js b/src/js/platform/sound.js index a2050e67..3983f08f 100644 --- a/src/js/platform/sound.js +++ b/src/js/platform/sound.js @@ -232,7 +232,7 @@ export class SoundInterface { * @param {number} volume */ setMusicVolume(volume) { - this.musicVolume = clamp(volume, 0, 1);; + this.musicVolume = clamp(volume, 0, 1); if (this.currentMusic) { this.currentMusic.setVolume(this.musicVolume); } @@ -240,7 +240,7 @@ export class SoundInterface { /** * Sets the sound volume - * @param {number} volume + * @param {number} volume */ setSoundVolume(volume) { this.soundVolume = clamp(volume, 0, 1); @@ -325,4 +325,4 @@ export class SoundInterface { } } } -} \ No newline at end of file +} diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 865d45d2..719ad062 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -23,7 +23,8 @@ export const enumCategories = { advanced: "advanced", }; -export const uiScales = [{ +export const uiScales = [ + { id: "super_small", size: 0.6, }, @@ -45,7 +46,8 @@ export const uiScales = [{ }, ]; -export const scrollWheelSensitivities = [{ +export const scrollWheelSensitivities = [ + { id: "super_slow", scale: 0.25, }, @@ -67,7 +69,8 @@ export const scrollWheelSensitivities = [{ }, ]; -export const movementSpeeds = [{ +export const movementSpeeds = [ + { id: "super_slow", multiplier: 0.25, }, @@ -93,7 +96,8 @@ export const movementSpeeds = [{ }, ]; -export const autosaveIntervals = [{ +export const autosaveIntervals = [ + { id: "one_minute", seconds: 60, }, @@ -150,9 +154,9 @@ export const allApplicationSettings = [ category: enumCategories.userInterface, restartRequired: false, changeCb: - /** - * @param {Application} app - */ + /** + * @param {Application} app + */ (app, id) => app.updateAfterUiScaleChanged(), }), @@ -199,7 +203,8 @@ export const allApplicationSettings = [ if (app.platformWrapper.getSupportsFullscreen()) { app.platformWrapper.setFullscreen(value); } - }, !IS_DEMO + }, + !IS_DEMO ), new BoolSetting( @@ -220,13 +225,13 @@ export const allApplicationSettings = [ category: enumCategories.userInterface, restartRequired: false, changeCb: - /** - * @param {Application} app - */ + /** + * @param {Application} app + */ (app, id) => { - applyGameTheme(id); - document.documentElement.setAttribute("data-theme", id); - }, + applyGameTheme(id); + document.documentElement.setAttribute("data-theme", id); + }, enabled: !IS_DEMO, }), @@ -237,9 +242,9 @@ export const allApplicationSettings = [ category: enumCategories.advanced, restartRequired: false, changeCb: - /** - * @param {Application} app - */ + /** + * @param {Application} app + */ (app, id) => null, }), @@ -250,9 +255,9 @@ export const allApplicationSettings = [ category: enumCategories.advanced, restartRequired: false, changeCb: - /** - * @param {Application} app - */ + /** + * @param {Application} app + */ (app, id) => app.updateAfterUiScaleChanged(), }), @@ -350,7 +355,7 @@ export class ApplicationSettings extends ReadWriteProxy { } }) - .then(() => this.writeAsync()); + .then(() => this.writeAsync()); } save() { @@ -486,12 +491,12 @@ export class ApplicationSettings extends ReadWriteProxy { * @param {string} id */ resetKeybindingOverride(id) { - delete this.getAllSettings().keybindingOverrides[id]; - return this.writeAsync(); - } - /** - * Resets all keybinding overrides - */ + delete this.getAllSettings().keybindingOverrides[id]; + return this.writeAsync(); + } + /** + * Resets all keybinding overrides + */ resetKeybindingOverrides() { this.getAllSettings().keybindingOverrides = {}; return this.writeAsync(); @@ -636,4 +641,4 @@ export class ApplicationSettings extends ReadWriteProxy { return ExplainedResult.good(); } -} \ No newline at end of file +} diff --git a/src/js/profile/setting_types.js b/src/js/profile/setting_types.js index 141c36ff..d21ad1bd 100644 --- a/src/js/profile/setting_types.js +++ b/src/js/profile/setting_types.js @@ -85,7 +85,8 @@ export class BaseSetting { export class EnumSetting extends BaseSetting { constructor( - id, { + id, + { options, valueGetter, textGetter, @@ -110,7 +111,7 @@ export class EnumSetting extends BaseSetting { } getHtml() { - return ` + return `
${this.enabled ? "" : `${T.demo.settingNotAvailable}`}
@@ -221,7 +222,16 @@ export class BoolSetting extends BaseSetting { } export class RangeSetting extends BaseSetting { - constructor(id, category, changeCb = null, enabled = true, defaultValue = 100, minValue = 0, maxValue = 100, stepSize = 1) { + constructor( + id, + category, + changeCb = null, + enabled = true, + defaultValue = 100, + minValue = 0, + maxValue = 100, + stepSize = 1 + ) { super(id, category, changeCb, enabled); this.defaultValue = defaultValue; @@ -239,7 +249,9 @@ export class RangeSetting extends BaseSetting {
- +
@@ -277,4 +289,4 @@ export class RangeSetting extends BaseSetting { validate(value) { return typeof value === "number"; } -} \ No newline at end of file +}