2d7e3424c179d135dc59489a147ede15a8748562.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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. var layout = _this2.getLayout();
  119. if (t != null) {
  120. if (t == type) return;
  121. type = t; // button_sound();
  122. }
  123. layout.Rank_Toggle_1.isChecked = type == 1;
  124. layout.Rank_Toggle_2.isChecked = type == 2;
  125. if (type == 1 || t == null) {
  126. yield (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  127. error: Error()
  128. }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  129. error: Error()
  130. }), UIWaiting) : UIWaiting);
  131. layout.list1.node.active = true;
  132. layout.list2.node.active = false;
  133. layout.list1.numItems = 0;
  134. var d = yield (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  135. error: Error()
  136. }), Hall) : Hall).getInstance().player.get_rank_floor();
  137. _this2._data = d.list;
  138. _this2._owner = d.owner;
  139. var index = d.index;
  140. layout.list1.numItems = _this2._data.length;
  141. if (!_this2._owner) {
  142. _this2._owner = {
  143. head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  144. error: Error()
  145. }), Hall) : Hall).getInstance().player.avatarUrl,
  146. nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  147. error: Error()
  148. }), Hall) : Hall).getInstance().player.nickName,
  149. score: 0,
  150. userId: 0,
  151. province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  152. error: Error()
  153. }), Hall) : Hall).getInstance().player.user_info.province
  154. };
  155. }
  156. layout.own1_item.showInfo(index, type, _this2._owner, true);
  157. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  158. error: Error()
  159. }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  160. error: Error()
  161. }), UIWaiting) : UIWaiting);
  162. }
  163. if (type == 2) {
  164. yield (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  165. error: Error()
  166. }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  167. error: Error()
  168. }), UIWaiting) : UIWaiting);
  169. layout.list2.node.active = true;
  170. layout.list1.node.active = false;
  171. layout.list2.numItems = 0;
  172. var _d = yield (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  173. error: Error()
  174. }), Hall) : Hall).getInstance().player.get_rank_floor();
  175. _this2._data = _d.list;
  176. _this2._owner = _d.owner;
  177. var _index = _d.index;
  178. layout.list2.numItems = _this2._data.length;
  179. if (!_this2._owner) {
  180. _this2._owner = {
  181. head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  182. error: Error()
  183. }), Hall) : Hall).getInstance().player.avatarUrl,
  184. nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  185. error: Error()
  186. }), Hall) : Hall).getInstance().player.nickName,
  187. score: 0,
  188. userId: 0,
  189. province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  190. error: Error()
  191. }), Hall) : Hall).getInstance().player.user_info.province
  192. };
  193. }
  194. layout.own2_item.showInfo(_index, type, _this2._owner, true);
  195. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  196. error: Error()
  197. }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  198. error: Error()
  199. }), UIWaiting) : UIWaiting);
  200. }
  201. })();
  202. }
  203. }) || _class));
  204. _cclegacy._RF.pop();
  205. _crd = false;
  206. }
  207. };
  208. });
  209. //# sourceMappingURL=2d7e3424c179d135dc59489a147ede15a8748562.js.map