2d7e3424c179d135dc59489a147ede15a8748562.js 9.0 KB

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