72b62451398272ab27094a680c58eab464b0f7c5.js 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7", "__unresolved_8"], function (_export, _context) {
  2. "use strict";
  3. 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;
  4. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
  5. function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
  6. function _reportPossibleCrUseOfGameUILayers(extras) {
  7. _reporterNs.report("GameUILayers", "../../../core/ui/ui", _context.meta, extras);
  8. }
  9. function _reportPossibleCrUseOfgui(extras) {
  10. _reporterNs.report("gui", "../../../core/ui/ui", _context.meta, extras);
  11. }
  12. function _reportPossibleCrUseOfui_base(extras) {
  13. _reporterNs.report("ui_base", "../../../core/ui/ui_base", _context.meta, extras);
  14. }
  15. function _reportPossibleCrUseOfUIWaiting(extras) {
  16. _reporterNs.report("UIWaiting", "../../../module_basic/ui_waiting/UIWaiting", _context.meta, extras);
  17. }
  18. function _reportPossibleCrUseOfModuleDef(extras) {
  19. _reporterNs.report("ModuleDef", "../../../Scripts/ModuleDef", _context.meta, extras);
  20. }
  21. function _reportPossibleCrUseOfLayout_Rank(extras) {
  22. _reporterNs.report("Layout_Rank", "./Layout_Rank", _context.meta, extras);
  23. }
  24. function _reportPossibleCrUseOfUI_Rank_Item(extras) {
  25. _reporterNs.report("UI_Rank_Item", "./UI_Rank_Item", _context.meta, extras);
  26. }
  27. function _reportPossibleCrUseOfani_ui(extras) {
  28. _reporterNs.report("ani_ui", "../UI_Main/UI_Main", _context.meta, extras);
  29. }
  30. function _reportPossibleCrUseOfHall(extras) {
  31. _reporterNs.report("Hall", "../../hall/Hall", _context.meta, extras);
  32. }
  33. return {
  34. setters: [function (_unresolved_) {
  35. _reporterNs = _unresolved_;
  36. }, function (_cc) {
  37. _cclegacy = _cc.cclegacy;
  38. __checkObsolete__ = _cc.__checkObsolete__;
  39. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  40. _decorator = _cc._decorator;
  41. }, function (_unresolved_2) {
  42. GameUILayers = _unresolved_2.GameUILayers;
  43. gui = _unresolved_2.gui;
  44. }, function (_unresolved_3) {
  45. ui_base = _unresolved_3.default;
  46. }, function (_unresolved_4) {
  47. UIWaiting = _unresolved_4.UIWaiting;
  48. }, function (_unresolved_5) {
  49. ModuleDef = _unresolved_5.ModuleDef;
  50. }, function (_unresolved_6) {
  51. Layout_Rank = _unresolved_6.Layout_Rank;
  52. }, function (_unresolved_7) {
  53. UI_Rank_Item = _unresolved_7.UI_Rank_Item;
  54. }, function (_unresolved_8) {
  55. ani_ui = _unresolved_8.ani_ui;
  56. }, function (_unresolved_9) {
  57. Hall = _unresolved_9.Hall;
  58. }],
  59. execute: function () {
  60. _crd = true;
  61. _cclegacy._RF.push({}, "25b8cJMNUNOA77jdI7BF1kA", "UI_Rank", undefined);
  62. __checkObsolete__(['_decorator', 'Toggle', 'Node']);
  63. ({
  64. ccclass,
  65. property
  66. } = _decorator);
  67. //1总榜2好友榜
  68. type = 1;
  69. _export("UI_Rank", UI_Rank = (_dec = ccclass('UI_Rank'), _dec(_class = class UI_Rank extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({
  70. error: Error()
  71. }), ui_base) : ui_base) {
  72. constructor() {
  73. super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
  74. error: Error()
  75. }), ModuleDef) : ModuleDef).GAME, 'ui/UI_Rank/Rank', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
  76. error: Error()
  77. }), GameUILayers) : GameUILayers).HUD, _crd && Layout_Rank === void 0 ? (_reportPossibleCrUseOfLayout_Rank({
  78. error: Error()
  79. }), Layout_Rank) : Layout_Rank);
  80. this._owner = void 0;
  81. this._data = void 0;
  82. this._openContext = void 0;
  83. }
  84. onCreated() {
  85. var layout = this.getLayout();
  86. (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
  87. error: Error()
  88. }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
  89. this.onButtonEvent(layout.Close_Btn, /*#__PURE__*/_asyncToGenerator(function* (button) {
  90. //关闭设置界面
  91. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  92. error: Error()
  93. }), gui) : gui).close(UI_Rank);
  94. }), this);
  95. layout.onList1 = (item, index) => {
  96. item.getComponent(_crd && UI_Rank_Item === void 0 ? (_reportPossibleCrUseOfUI_Rank_Item({
  97. error: Error()
  98. }), UI_Rank_Item) : UI_Rank_Item).showInfo(index + 1, type, this._data[index], false);
  99. };
  100. layout.onList2 = (item, index) => {// item.getComponent(ui_skin_block).showInfo(index + 1, this._data2[index]);
  101. };
  102. layout.Rank_Toggle_1.isChecked = type == 1;
  103. layout.Rank_Toggle_2.isChecked = type == 2;
  104. this.show();
  105. this.onToggleEvent(layout.Rank_Toggle_1, (tg, i) => {
  106. if (tg.isChecked) this.show(i);
  107. }, this, 1);
  108. this.onToggleEvent(layout.Rank_Toggle_2, (tg, i) => {
  109. if (tg.isChecked) this.show(i);
  110. }, this, 2);
  111. }
  112. show(t) {
  113. var _this = this;
  114. return _asyncToGenerator(function* () {
  115. var layout = _this.getLayout();
  116. if (t != null) {
  117. if (t == type) return;
  118. type = t; // button_sound();
  119. }
  120. layout.Rank_Toggle_1.isChecked = type == 1;
  121. layout.Rank_Toggle_2.isChecked = type == 2;
  122. if (type == 1 || t == null) {
  123. yield (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  124. error: Error()
  125. }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  126. error: Error()
  127. }), UIWaiting) : UIWaiting);
  128. layout.list1.node.active = true;
  129. layout.list2.node.active = false;
  130. layout.list1.numItems = 0;
  131. var d = yield (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  132. error: Error()
  133. }), Hall) : Hall).getInstance().player.get_rank_floor();
  134. _this._data = d.list;
  135. _this._owner = d.owner;
  136. var index = d.index;
  137. layout.list1.numItems = _this._data.length;
  138. if (!_this._owner) {
  139. _this._owner = {
  140. head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  141. error: Error()
  142. }), Hall) : Hall).getInstance().player.avatarUrl,
  143. nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  144. error: Error()
  145. }), Hall) : Hall).getInstance().player.nickName,
  146. score: 0,
  147. userId: 0,
  148. province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  149. error: Error()
  150. }), Hall) : Hall).getInstance().player.user_info.province
  151. };
  152. }
  153. layout.own1_item.showInfo(index, type, _this._owner, true);
  154. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  155. error: Error()
  156. }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  157. error: Error()
  158. }), UIWaiting) : UIWaiting);
  159. }
  160. if (type == 2) {
  161. yield (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  162. error: Error()
  163. }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  164. error: Error()
  165. }), UIWaiting) : UIWaiting);
  166. layout.list2.node.active = true;
  167. layout.list1.node.active = false;
  168. layout.list2.numItems = 0;
  169. var _d = yield (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  170. error: Error()
  171. }), Hall) : Hall).getInstance().player.get_rank_floor();
  172. _this._data = _d.list;
  173. _this._owner = _d.owner;
  174. var _index = _d.index;
  175. layout.list2.numItems = _this._data.length;
  176. if (!_this._owner) {
  177. _this._owner = {
  178. head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  179. error: Error()
  180. }), Hall) : Hall).getInstance().player.avatarUrl,
  181. nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  182. error: Error()
  183. }), Hall) : Hall).getInstance().player.nickName,
  184. score: 0,
  185. userId: 0,
  186. province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  187. error: Error()
  188. }), Hall) : Hall).getInstance().player.user_info.province
  189. };
  190. }
  191. layout.own2_item.showInfo(_index, type, _this._owner, true);
  192. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  193. error: Error()
  194. }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  195. error: Error()
  196. }), UIWaiting) : UIWaiting);
  197. }
  198. })();
  199. }
  200. }) || _class));
  201. _cclegacy._RF.pop();
  202. _crd = false;
  203. }
  204. };
  205. });
  206. //# sourceMappingURL=72b62451398272ab27094a680c58eab464b0f7c5.js.map