SeasonPassView.ts 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. import { _decorator, Button, Color, EditBox, instantiate, Label, Node, RichText, Sprite, SpriteFrame, UITransform } from 'cc';
  2. import { UIView } from '@scripts/framework/ui/UIView';
  3. import { AppKernel } from '@scripts/app/AppKernel';
  4. import { UIViewID } from '@scripts/define/UIDefine';
  5. import { UICloseReason } from '@scripts/framework/ui/UILayer';
  6. import { formatCurrency } from '@scripts/utils/Helper';
  7. import { addBtnClick } from '@scripts/utils/UIHelper';
  8. const { ccclass, property } = _decorator;
  9. @ccclass('SeasonPassView')
  10. export class SeasonPassView extends UIView {
  11. readonly viewId = UIViewID.SeasonPassView;
  12. @property(Node)
  13. item_DLX: Node = null;
  14. @property(Node)
  15. item_free: Node = null;
  16. @property(Node)
  17. item_progress: Node = null;
  18. @property(Node)
  19. scrollView_content: Node = null;
  20. protected onCreate(): void | Promise<void> {
  21. // addBtnClick(this.btnGuest.node, this.onBtnGuestClick, this);
  22. // addBtnClick(this.btnFacebook.node, this.onBtnFBClick, this);
  23. // addBtnClick(this.btnGoogle.node, this.onBtnGoogleClick, this);
  24. // this._googleWebBtn = AppKernel.google.createLoginBtn(
  25. // this.btnGoogle.node,
  26. // res => this.onGoogleWebLogin(res),
  27. // );
  28. // addBtnClick(this.btnRegister, this.onBtnRegisterClick, this);
  29. // addBtnClick(this.btnLogin, this.onBtnLoginClick, this);
  30. // addBtnClick(this.btnResetPsd, this.onBtnResetPsdClick, this);
  31. // addBtnClick(this.btnSupport, this.onBtnSupportClick, this);
  32. // this.initPsdInput();
  33. // this.initPolicyDesc();
  34. // this.initScrollView();
  35. }
  36. protected onOpen(_params: unknown): void | Promise<void> {
  37. }
  38. protected onClose(_reason: UICloseReason): void | Promise<void> {
  39. }
  40. protected onDestroy(): void {
  41. }
  42. private initScrollView() {
  43. // const items_data = new Array(10).fill(0);
  44. // items_data.forEach((item, index) => {
  45. // const item_DLX = instantiate(this.item_DLX);
  46. // item_DLX.parent = this.item_DLX.parent;
  47. // item_DLX.active = true;
  48. // const item_free = instantiate(this.item_free);
  49. // item_free.parent = this.item_free.parent;
  50. // item_free.active = true;
  51. // const item_progress = instantiate(this.item_progress);
  52. // item_progress.parent = this.item_progress.parent;
  53. // item_progress.active = true;
  54. // })
  55. // this.scheduleOnce(() => {
  56. // console.log("item_DLX.parent.width", this.item_DLX.parent.getComponent(UITransform).width)
  57. // console.log("item_free.parent.width", this.item_free.parent.getComponent(UITransform).width)
  58. // console.log("item_progress.parent.width", this.item_progress.parent.getComponent(UITransform).width)
  59. // this.scrollView_content.getComponent(UITransform).width = this.item_free.parent.getComponent(UITransform).width;
  60. // })
  61. }
  62. }