System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7", "__unresolved_8"], function (_export, _context) { "use strict"; var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, GameUILayers, gui, ui_base, UIWaiting, ModuleDef, Layout_Rank, UI_Rank_Item, ani_ui, Hall, _dec, _class, _crd, ccclass, property, type, UI_Rank; 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_base", _context.meta, extras); } function _reportPossibleCrUseOfUIWaiting(extras) { _reporterNs.report("UIWaiting", "../../../module_basic/ui_waiting/UIWaiting", _context.meta, extras); } function _reportPossibleCrUseOfModuleDef(extras) { _reporterNs.report("ModuleDef", "../../../Scripts/ModuleDef", _context.meta, extras); } function _reportPossibleCrUseOfLayout_Rank(extras) { _reporterNs.report("Layout_Rank", "./Layout_Rank", _context.meta, extras); } function _reportPossibleCrUseOfUI_Rank_Item(extras) { _reporterNs.report("UI_Rank_Item", "./UI_Rank_Item", _context.meta, extras); } function _reportPossibleCrUseOfani_ui(extras) { _reporterNs.report("ani_ui", "../UI_Main/UI_Main", _context.meta, extras); } function _reportPossibleCrUseOfHall(extras) { _reporterNs.report("Hall", "../../hall/Hall", _context.meta, extras); } return { setters: [function (_unresolved_) { _reporterNs = _unresolved_; }, function (_cc) { _cclegacy = _cc.cclegacy; __checkObsolete__ = _cc.__checkObsolete__; __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__; _decorator = _cc._decorator; }, function (_unresolved_2) { GameUILayers = _unresolved_2.GameUILayers; gui = _unresolved_2.gui; }, function (_unresolved_3) { ui_base = _unresolved_3.default; }, function (_unresolved_4) { UIWaiting = _unresolved_4.UIWaiting; }, function (_unresolved_5) { ModuleDef = _unresolved_5.ModuleDef; }, function (_unresolved_6) { Layout_Rank = _unresolved_6.Layout_Rank; }, function (_unresolved_7) { UI_Rank_Item = _unresolved_7.UI_Rank_Item; }, function (_unresolved_8) { ani_ui = _unresolved_8.ani_ui; }, function (_unresolved_9) { Hall = _unresolved_9.Hall; }], execute: function () { _crd = true; _cclegacy._RF.push({}, "25b8cJMNUNOA77jdI7BF1kA", "UI_Rank", undefined); __checkObsolete__(['_decorator', 'Toggle', 'Node']); ({ ccclass, property } = _decorator); //1总榜2好友榜 type = 1; _export("UI_Rank", UI_Rank = (_dec = ccclass('UI_Rank'), _dec(_class = class UI_Rank 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).GAME, 'ui/UI_Rank/Rank', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({ error: Error() }), GameUILayers) : GameUILayers).HUD, _crd && Layout_Rank === void 0 ? (_reportPossibleCrUseOfLayout_Rank({ error: Error() }), Layout_Rank) : Layout_Rank); this._owner = void 0; this._data = void 0; this._openContext = void 0; } onCreated() { const layout = this.getLayout(); (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({ error: Error() }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent); this.onButtonEvent(layout.Close_Btn, async button => { //关闭设置界面 (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({ error: Error() }), gui) : gui).close(UI_Rank); }, this); layout.onList1 = (item, index) => { item.getComponent(_crd && UI_Rank_Item === void 0 ? (_reportPossibleCrUseOfUI_Rank_Item({ error: Error() }), UI_Rank_Item) : UI_Rank_Item).showInfo(index + 1, type, this._data[index], false); }; layout.onList2 = (item, index) => {// item.getComponent(ui_skin_block).showInfo(index + 1, this._data2[index]); }; layout.Rank_Toggle_1.isChecked = type == 1; layout.Rank_Toggle_2.isChecked = type == 2; this.show(); this.onToggleEvent(layout.Rank_Toggle_1, (tg, i) => { if (tg.isChecked) this.show(i); }, this, 1); this.onToggleEvent(layout.Rank_Toggle_2, (tg, i) => { if (tg.isChecked) this.show(i); }, this, 2); } async show(t) { const layout = this.getLayout(); if (t != null) { if (t == type) return; type = t; // button_sound(); } layout.Rank_Toggle_1.isChecked = type == 1; layout.Rank_Toggle_2.isChecked = type == 2; if (type == 1 || t == null) { await (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({ error: Error() }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({ error: Error() }), UIWaiting) : UIWaiting); layout.list1.node.active = true; layout.list2.node.active = false; layout.list1.numItems = 0; const d = await (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({ error: Error() }), Hall) : Hall).getInstance().player.get_rank_floor(); this._data = d.list; this._owner = d.owner; let index = d.index; layout.list1.numItems = this._data.length; if (!this._owner) { this._owner = { head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({ error: Error() }), Hall) : Hall).getInstance().player.avatarUrl, nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({ error: Error() }), Hall) : Hall).getInstance().player.nickName, score: 0, userId: 0, province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({ error: Error() }), Hall) : Hall).getInstance().player.user_info.province }; } layout.own1_item.showInfo(index, type, this._owner, true); (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({ error: Error() }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({ error: Error() }), UIWaiting) : UIWaiting); } if (type == 2) { await (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({ error: Error() }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({ error: Error() }), UIWaiting) : UIWaiting); layout.list2.node.active = true; layout.list1.node.active = false; layout.list2.numItems = 0; const d = await (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({ error: Error() }), Hall) : Hall).getInstance().player.get_rank_floor(); this._data = d.list; this._owner = d.owner; let index = d.index; layout.list2.numItems = this._data.length; if (!this._owner) { this._owner = { head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({ error: Error() }), Hall) : Hall).getInstance().player.avatarUrl, nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({ error: Error() }), Hall) : Hall).getInstance().player.nickName, score: 0, userId: 0, province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({ error: Error() }), Hall) : Hall).getInstance().player.user_info.province }; } layout.own2_item.showInfo(index, type, this._owner, true); (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({ error: Error() }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({ error: Error() }), UIWaiting) : UIWaiting); } } }) || _class)); _cclegacy._RF.pop(); _crd = false; } }; }); //# sourceMappingURL=72b62451398272ab27094a680c58eab464b0f7c5.js.map