UNPKG

@kitten-science/kitten-scientists

Version:

Add-on for the wonderful incremental browser game: https://kittensgame.com/web/

51 lines 2.37 kB
import { ResetBonfireSettingsUi } from "./ResetBonfireSettingsUi.js"; import { ResetReligionSettingsUi } from "./ResetReligionSettingsUi.js"; import { ResetResourcesSettingsUi } from "./ResetResourcesSettingsUi.js"; import { ResetSpaceSettingsUi } from "./ResetSpaceSettingsUi.js"; import { ResetTimeSettingsUi } from "./ResetTimeSettingsUi.js"; import { ResetUpgradesSettingsUi } from "./ResetUpgradesSettingsUi.js"; import { Container } from "./components/Container.js"; import stylesLabelListItem from "./components/LabelListItem.module.css"; import { SettingListItem } from "./components/SettingListItem.js"; import { SettingsList } from "./components/SettingsList.js"; import { SettingsPanel } from "./components/SettingsPanel.js"; export class ResetSettingsUi extends SettingsPanel { _bonfireUi; _religionUi; _resourcesUi; _spaceUi; _timeUi; _upgradesUi; constructor(host, settings, locale, options) { const label = host.engine.i18n("option.time.reset"); super(host, settings, new SettingListItem(host, settings, label, { childrenHead: [new Container(host, { classes: [stylesLabelListItem.fillSpace] })], onCheck: () => { host.engine.imessage("status.auto.enable", [label]); }, onUnCheck: () => { host.engine.imessage("status.auto.disable", [label]); }, }), options); const list = new SettingsList(host, { hasDisableAll: false, hasEnableAll: false, }); this._bonfireUi = new ResetBonfireSettingsUi(host, this.setting.bonfire, locale); this._religionUi = new ResetReligionSettingsUi(host, this.setting.religion, locale); this._resourcesUi = new ResetResourcesSettingsUi(host, this.setting.resources, locale); this._spaceUi = new ResetSpaceSettingsUi(host, this.setting.space, locale); this._timeUi = new ResetTimeSettingsUi(host, this.setting.time, locale); this._upgradesUi = new ResetUpgradesSettingsUi(host, this.setting.upgrades, locale); list.addChildren([ this._bonfireUi, this._religionUi, this._resourcesUi, this._spaceUi, this._timeUi, this._upgradesUi, ]); this.addChild(list); } } //# sourceMappingURL=ResetSettingsUi.js.map