2d7e3424c179d135dc59489a147ede15a8748562.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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 _this = this;
  86. return _asyncToGenerator(function* () {
  87. var layout = _this.getLayout();
  88. (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
  89. error: Error()
  90. }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
  91. _this.onButtonEvent(layout.Close_Btn, /*#__PURE__*/_asyncToGenerator(function* (button) {
  92. //关闭设置界面
  93. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  94. error: Error()
  95. }), gui) : gui).close(UI_Rank);
  96. }), _this);
  97. layout.onList1 = (item, index) => {
  98. item.getComponent(_crd && UI_Rank_Item === void 0 ? (_reportPossibleCrUseOfUI_Rank_Item({
  99. error: Error()
  100. }), UI_Rank_Item) : UI_Rank_Item).showInfo(index + 1, type, _this._data[index], false);
  101. };
  102. layout.onList2 = (item, index) => {// item.getComponent(ui_skin_block).showInfo(index + 1, this._data2[index]);
  103. };
  104. layout.Rank_Toggle_1.isChecked = type == 1;
  105. layout.Rank_Toggle_2.isChecked = type == 2;
  106. _this.show();
  107. _this.onToggleEvent(layout.Rank_Toggle_1, (tg, i) => {
  108. if (tg.isChecked) _this.show(i);
  109. }, _this, 1);
  110. _this.onToggleEvent(layout.Rank_Toggle_2, (tg, i) => {
  111. if (tg.isChecked) _this.show(i);
  112. }, _this, 2);
  113. })();
  114. }
  115. show(t) {
  116. var _this2 = this;
  117. return _asyncToGenerator(function* () {
  118. if (t != null) {
  119. if (t == type) return;
  120. type = t; // button_sound();
  121. }
  122. var layout = _this2.getLayout();
  123. if (type == 1 || t == null) {
  124. yield (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  125. error: Error()
  126. }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  127. error: Error()
  128. }), UIWaiting) : UIWaiting);
  129. layout.list1.node.active = true;
  130. layout.list2.node.active = false;
  131. layout.list1.numItems = 0;
  132. var d = yield (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  133. error: Error()
  134. }), Hall) : Hall).getInstance().player.get_rank_floor();
  135. _this2._data = d.list;
  136. _this2._owner = d.owner;
  137. var index = d.index;
  138. layout.list1.numItems = _this2._data.length;
  139. if (!_this2._owner) {
  140. _this2._owner = {
  141. head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  142. error: Error()
  143. }), Hall) : Hall).getInstance().player.avatarUrl,
  144. nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  145. error: Error()
  146. }), Hall) : Hall).getInstance().player.nickName,
  147. score: 0,
  148. userId: 0,
  149. province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  150. error: Error()
  151. }), Hall) : Hall).getInstance().player.user_info.province
  152. };
  153. }
  154. layout.own1_item.showInfo(index, type, _this2._owner, true);
  155. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  156. error: Error()
  157. }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  158. error: Error()
  159. }), UIWaiting) : UIWaiting);
  160. }
  161. if (type == 2) {
  162. yield (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  163. error: Error()
  164. }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  165. error: Error()
  166. }), UIWaiting) : UIWaiting);
  167. layout.list2.node.active = true;
  168. layout.list1.node.active = false;
  169. layout.list2.numItems = 0;
  170. var _d = yield (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  171. error: Error()
  172. }), Hall) : Hall).getInstance().player.get_rank_floor();
  173. _this2._data = _d.list;
  174. _this2._owner = _d.owner;
  175. var _index = _d.index;
  176. layout.list2.numItems = _this2._data.length;
  177. if (!_this2._owner) {
  178. _this2._owner = {
  179. head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  180. error: Error()
  181. }), Hall) : Hall).getInstance().player.avatarUrl,
  182. nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  183. error: Error()
  184. }), Hall) : Hall).getInstance().player.nickName,
  185. score: 0,
  186. userId: 0,
  187. province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  188. error: Error()
  189. }), Hall) : Hall).getInstance().player.user_info.province
  190. };
  191. }
  192. layout.own2_item.showInfo(_index, type, _this2._owner, true);
  193. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  194. error: Error()
  195. }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  196. error: Error()
  197. }), UIWaiting) : UIWaiting);
  198. }
  199. })();
  200. }
  201. }) || _class));
  202. _cclegacy._RF.pop();
  203. _crd = false;
  204. }
  205. };
  206. });
  207. //# sourceMappingURL=2d7e3424c179d135dc59489a147ede15a8748562.js.map