2d7e3424c179d135dc59489a147ede15a8748562.js 8.9 KB

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