2d7e3424c179d135dc59489a147ede15a8748562.js 8.9 KB

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