1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fixed the formatting, removed extra semicolon

This commit is contained in:
Yoshie2000 2020-08-31 10:56:50 +02:00
parent 54d7ef82f2
commit 9c3d23eab5
5 changed files with 58 additions and 41 deletions

View File

@ -232,7 +232,7 @@ export class SoundInterface {
* @param {number} volume * @param {number} volume
*/ */
setMusicVolume(volume) { setMusicVolume(volume) {
this.musicVolume = clamp(volume, 0, 1);; this.musicVolume = clamp(volume, 0, 1);
if (this.currentMusic) { if (this.currentMusic) {
this.currentMusic.setVolume(this.musicVolume); this.currentMusic.setVolume(this.musicVolume);
} }

View File

@ -23,7 +23,8 @@ export const enumCategories = {
advanced: "advanced", advanced: "advanced",
}; };
export const uiScales = [{ export const uiScales = [
{
id: "super_small", id: "super_small",
size: 0.6, size: 0.6,
}, },
@ -45,7 +46,8 @@ export const uiScales = [{
}, },
]; ];
export const scrollWheelSensitivities = [{ export const scrollWheelSensitivities = [
{
id: "super_slow", id: "super_slow",
scale: 0.25, scale: 0.25,
}, },
@ -67,7 +69,8 @@ export const scrollWheelSensitivities = [{
}, },
]; ];
export const movementSpeeds = [{ export const movementSpeeds = [
{
id: "super_slow", id: "super_slow",
multiplier: 0.25, multiplier: 0.25,
}, },
@ -93,7 +96,8 @@ export const movementSpeeds = [{
}, },
]; ];
export const autosaveIntervals = [{ export const autosaveIntervals = [
{
id: "one_minute", id: "one_minute",
seconds: 60, seconds: 60,
}, },
@ -199,7 +203,8 @@ export const allApplicationSettings = [
if (app.platformWrapper.getSupportsFullscreen()) { if (app.platformWrapper.getSupportsFullscreen()) {
app.platformWrapper.setFullscreen(value); app.platformWrapper.setFullscreen(value);
} }
}, !IS_DEMO },
!IS_DEMO
), ),
new BoolSetting( new BoolSetting(

View File

@ -85,7 +85,8 @@ export class BaseSetting {
export class EnumSetting extends BaseSetting { export class EnumSetting extends BaseSetting {
constructor( constructor(
id, { id,
{
options, options,
valueGetter, valueGetter,
textGetter, textGetter,
@ -221,7 +222,16 @@ export class BoolSetting extends BaseSetting {
} }
export class RangeSetting 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); super(id, category, changeCb, enabled);
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
@ -239,7 +249,9 @@ export class RangeSetting extends BaseSetting {
<label>${T.settings.labels[this.id].title}</label> <label>${T.settings.labels[this.id].title}</label>
<div class="value range" data-setting="${this.id}"> <div class="value range" data-setting="${this.id}">
<label class="range-label">${this.defaultValue}</label> <label class="range-label">${this.defaultValue}</label>
<input class="range-input" type="range" value="${this.defaultValue}" min="${this.minValue}" max="${this.maxValue}" step="${this.stepSize}"> <input class="range-input" type="range" value="${this.defaultValue}" min="${
this.minValue
}" max="${this.maxValue}" step="${this.stepSize}">
</div> </div>
</div> </div>
<div class="desc"> <div class="desc">