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:
parent
54d7ef82f2
commit
9c3d23eab5
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -211,4 +211,4 @@ export class SoundImplBrowser extends SoundInterface {
|
||||
deinitialize() {
|
||||
return super.deinitialize().then(() => Howler.unload());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 `
|
||||
<div class="setting cardbox ${this.enabled ? "enabled" : "disabled"}">
|
||||
${this.enabled ? "" : `<span class="standaloneOnlyHint">${T.demo.settingNotAvailable}</span>`}
|
||||
<div class="row">
|
||||
@ -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 {
|
||||
<label>${T.settings.labels[this.id].title}</label>
|
||||
<div class="value range" data-setting="${this.id}">
|
||||
<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 class="desc">
|
||||
@ -277,4 +289,4 @@ export class RangeSetting extends BaseSetting {
|
||||
validate(value) {
|
||||
return typeof value === "number";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user