2d7e3424c179d135dc59489a147ede15a8748562.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, GameUILayers, gui, ui_base, ModuleDef, Layout_Rank, ani_ui, UIWaiting, Hall, _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. return {
  29. setters: [function (_unresolved_) {
  30. _reporterNs = _unresolved_;
  31. }, function (_cc) {
  32. _cclegacy = _cc.cclegacy;
  33. __checkObsolete__ = _cc.__checkObsolete__;
  34. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  35. _decorator = _cc._decorator;
  36. }, function (_unresolved_2) {
  37. GameUILayers = _unresolved_2.GameUILayers;
  38. gui = _unresolved_2.gui;
  39. }, function (_unresolved_3) {
  40. ui_base = _unresolved_3.default;
  41. }, function (_unresolved_4) {
  42. ModuleDef = _unresolved_4.ModuleDef;
  43. }, function (_unresolved_5) {
  44. Layout_Rank = _unresolved_5.Layout_Rank;
  45. }, function (_unresolved_6) {
  46. ani_ui = _unresolved_6.ani_ui;
  47. }, function (_unresolved_7) {
  48. UIWaiting = _unresolved_7.UIWaiting;
  49. }, function (_unresolved_8) {
  50. Hall = _unresolved_8.Hall;
  51. }],
  52. execute: function () {
  53. _crd = true;
  54. _cclegacy._RF.push({}, "25b8cJMNUNOA77jdI7BF1kA", "UI_Rank", undefined);
  55. __checkObsolete__(['_decorator', 'Component', 'Node', 'Toggle']);
  56. ({
  57. ccclass,
  58. property
  59. } = _decorator);
  60. //1总榜2好友榜
  61. type = 1;
  62. _export("UI_Rank", UI_Rank = (_dec = ccclass('UI_Rank'), _dec(_class = class UI_Rank extends (_crd && ui_base === void 0 ? (_reportPossibleCrUseOfui_base({
  63. error: Error()
  64. }), ui_base) : ui_base) {
  65. constructor() {
  66. super((_crd && ModuleDef === void 0 ? (_reportPossibleCrUseOfModuleDef({
  67. error: Error()
  68. }), ModuleDef) : ModuleDef).GAME, 'ui/UI_Rank/Rank', (_crd && GameUILayers === void 0 ? (_reportPossibleCrUseOfGameUILayers({
  69. error: Error()
  70. }), GameUILayers) : GameUILayers).HUD, _crd && Layout_Rank === void 0 ? (_reportPossibleCrUseOfLayout_Rank({
  71. error: Error()
  72. }), Layout_Rank) : Layout_Rank);
  73. this._owner = void 0;
  74. this._data = void 0;
  75. }
  76. async onCreated() {
  77. const layout = this.getLayout();
  78. (_crd && ani_ui === void 0 ? (_reportPossibleCrUseOfani_ui({
  79. error: Error()
  80. }), ani_ui) : ani_ui)(layout.Close_Btn.node.parent);
  81. this.onButtonEvent(layout.Close_Btn, async button => {
  82. //关闭设置界面
  83. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  84. error: Error()
  85. }), gui) : gui).close(UI_Rank);
  86. }, this);
  87. layout.onList1 = (item, index) => {// item.getComponent(ui_skin_item).showInfo(index + 1, this._data1[index]);
  88. };
  89. layout.onList2 = (item, index) => {// item.getComponent(ui_skin_block).showInfo(index + 1, this._data2[index]);
  90. };
  91. layout.list1.numItems = type == 1 ? 10 : 0;
  92. layout.list2.numItems = type == 2 ? 10 : 0;
  93. layout.Rank_Toggle_1.isChecked = type == 1;
  94. layout.Rank_Toggle_2.isChecked = type == 2;
  95. this.show();
  96. this.onToggleEvent(layout.Rank_Toggle_1, (tg, i) => {
  97. if (tg.isChecked) this.show(i);
  98. }, this, 1);
  99. this.onToggleEvent(layout.Rank_Toggle_2, (tg, i) => {
  100. if (tg.isChecked) this.show(i);
  101. }, this, 2);
  102. }
  103. async show(t) {
  104. if (t != null) {
  105. if (t == type) return;
  106. type = t; // button_sound();
  107. }
  108. const layout = this.getLayout();
  109. await (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  110. error: Error()
  111. }), gui) : gui).show(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  112. error: Error()
  113. }), UIWaiting) : UIWaiting);
  114. if (type == 1) {
  115. layout.list1.node.active = true;
  116. layout.list1.numItems = 0;
  117. const d = await (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  118. error: Error()
  119. }), Hall) : Hall).getInstance().player.get_rank_floor();
  120. this._data = d.list;
  121. this._owner = d.owner;
  122. let index = d.index;
  123. layout.list1.numItems = this._data.length;
  124. if (!this._owner) {
  125. this._owner = {
  126. head: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  127. error: Error()
  128. }), Hall) : Hall).getInstance().player.avatarUrl,
  129. nickName: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  130. error: Error()
  131. }), Hall) : Hall).getInstance().player.nickName,
  132. score: 0,
  133. userId: 0,
  134. province: (_crd && Hall === void 0 ? (_reportPossibleCrUseOfHall({
  135. error: Error()
  136. }), Hall) : Hall).getInstance().player.user_info.province
  137. }; // layout.own_item.showInfo(index, type, this._ower, true);
  138. }
  139. (_crd && gui === void 0 ? (_reportPossibleCrUseOfgui({
  140. error: Error()
  141. }), gui) : gui).close(_crd && UIWaiting === void 0 ? (_reportPossibleCrUseOfUIWaiting({
  142. error: Error()
  143. }), UIWaiting) : UIWaiting);
  144. }
  145. if (type == 2) {
  146. layout.list2.node.active = true;
  147. }
  148. }
  149. }) || _class));
  150. _cclegacy._RF.pop();
  151. _crd = false;
  152. }
  153. };
  154. });
  155. //# sourceMappingURL=2d7e3424c179d135dc59489a147ede15a8748562.js.map