System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5"], function (_export, _context) { "use strict"; var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, Layout_Set, ModuleDef, GameUILayers, gui, ui_base, ch, get_new_wait, UI_Set, _crd; function _reportPossibleCrUseOfLayout_Set(extras) { _reporterNs.report("Layout_Set", "./Layout_Set", _context.meta, extras); } function _reportPossibleCrUseOfModuleDef(extras) { _reporterNs.report("ModuleDef", "../../scripts/ModuleDef", _context.meta, extras); } function _reportPossibleCrUseOfGameUILayers(extras) { _reporterNs.report("GameUILayers", "../../core/ui/ui", _context.meta, extras); } function _reportPossibleCrUseOfgui(extras) { _reporterNs.report("gui", "../../core/ui/ui", _context.meta, extras); } function _reportPossibleCrUseOfui_base(extras) { _reporterNs.report("ui_base", "../../core/ui/ui", _context.meta, extras); } function _reportPossibleCrUseOfch(extras) { _reporterNs.report("ch", "../../ch/ch", _context.meta, extras); } function _reportPossibleCrUseOfget_new_wait(extras) { _reporterNs.report("get_new_wait", "../../core/util_class/Wait", _context.meta, extras); } _export("UI_Set", void 0); return { setters: [function (_unresolved_) { _reporterNs = _unresolved_; }, function (_cc) { _cclegacy = _cc.cclegacy; __checkObsolete__ = _cc.__checkObsolete__; __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__; }, function (_unresolved_2) { Layout_Set = _unresolved_2.Layout_Set; }, function (_unresolved_3) { ModuleDef = _unresolved_3.ModuleDef; }, function (_unresolved_4) { GameUILayers = _unresolved_4.GameUILayers; gui = _unresolved_4.gui; ui_base = _unresolved_4.ui_base; }, function (_unresolved_5) { ch = _unresolved_5.ch; }, function (_unresolved_6) { get_new_wait = _unresolved_6.default; }], execute: function () { _crd = true; _cclegacy._RF.push({}, "f6ce46tVeNIMLXLIOeXtxW8", "UI_Set", undefined); __checkObsolete__(['Button', 'Size', 'Toggle']); _export("UI_Set", UI_Set = class UI_Set extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({ error: Error() }), ui_base) : ui_base) { constructor() { super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({ error: Error() }), ModuleDef) : ModuleDef).BASIC, 'ui_set/UI_Set', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({ error: Error() }), GameUILayers) : GameUILayers).POPUP, _crd && Layout_Set === void 0 ? (_reportPossibleCrUseOfLayout_Set({ error: Error() }), Layout_Set) : Layout_Set); this.wait = (_crd && get_new_wait === void 0 ? (_reportPossibleCrUseOfget_new_wait({ error: Error() }), get_new_wait) : get_new_wait)(); } onCreated(is_in_game) { let layout = this.getLayout(); this.onButtonEvent(layout.btnClose, this.onClose, this); this.onButtonEvent(layout.btnRestart, this.onRestart, this); this.onButtonEvent(layout.btnMain, this.onMain, this); layout.toogleMusic.isChecked = (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({ error: Error() }), ch) : ch).audio.volumeMusic == 0; layout.toogleSound.isChecked = !(_crd && ch === void 0 ? (_reportPossibleCrUseOfch({ error: Error() }), ch) : ch).audio.switchEffect; this.onToggleEvent(layout.toogleMusic, this.onMusic, this); this.onToggleEvent(layout.toogleSound, this.onSound, this); (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({ error: Error() }), ch) : ch).audio.pause(); (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({ error: Error() }), gui) : gui).scale_anim(layout.btnClose.node.parent); // layout.btnRestart.node.active = is_in_game; layout.btnMain.node.active = is_in_game; } onClose(button) { this.wait.resolve(null); this.close(); (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({ error: Error() }), ch) : ch).audio.resume(); } async await_choose() { return this.wait.wait(); } onRestart(button) { this.wait.resolve('restart'); this.close(); } onMain(button) { this.wait.resolve('remain'); this.close(); } onMusic(toggle) { (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({ error: Error() }), ch) : ch).audio.volumeMusic = toggle.isChecked ? 0 : 1; (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({ error: Error() }), ch) : ch).audio.save(); } onSound(toggle) { (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({ error: Error() }), ch) : ch).audio.switchEffect = !toggle.isChecked; (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({ error: Error() }), ch) : ch).audio.save(); } onDispose() { var _this$wait, _this$wait2; (_this$wait = this.wait) == null || _this$wait.resolve(null); (_this$wait2 = this.wait) == null || _this$wait2.dispose(); this.wait = null; } }); _cclegacy._RF.pop(); _crd = false; } }; }); //# sourceMappingURL=021b7153c5f26891cb3b45a83f9a80f43db37b03.js.map