mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-02-12 02:49:20 +00:00
actually disable disabled settings
This commit is contained in:
parent
6176338e1f
commit
480d5b22fd
@ -167,6 +167,9 @@ export class EnumSetting extends BaseSetting {
|
|||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
optionSelected.add(value => {
|
optionSelected.add(value => {
|
||||||
|
if (!this.enabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.app.settings.updateSetting(this.id, value);
|
this.app.settings.updateSetting(this.id, value);
|
||||||
this.syncValueToElement();
|
this.syncValueToElement();
|
||||||
|
|
||||||
@ -212,6 +215,9 @@ export class BoolSetting extends BaseSetting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
modify() {
|
modify() {
|
||||||
|
if (!this.enabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const newValue = !this.app.settings.getSetting(this.id);
|
const newValue = !this.app.settings.getSetting(this.id);
|
||||||
this.app.settings.updateSetting(this.id, newValue);
|
this.app.settings.updateSetting(this.id, newValue);
|
||||||
this.syncValueToElement();
|
this.syncValueToElement();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user