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AAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;mDACV;IAErC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;uDACJ;IAE3C;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;0DACJ;IAE1C;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;mDACR;IAX9B,gBAAgB;QAF5B,OAAO;QACP,gCAAO,CAAC,+BAAgB,EAAE,wBAAwB,CAAC;OACvC,gBAAgB,CAyF5B;IAAD,uBAAC;KAAA;AAzFY,4CAAgB","file":"","sourceRoot":"/","sourcesContent":["import { SDK } from \"simba-sdk\";\nimport { DummyButton, DummyLabel, DummyNode, DummySprite } from \"../../../../common/CCDummyObjects\";\nimport { CCPureView } from \"../../../../common/classbase/CCViewBase\";\nimport { ResUtils } from \"simba-cc-resutils\";\nimport { RegView } from \"../../PresenterCCViewFactory\";\nimport { DiscoverView, DiscoverViewProps, DiscoverViewType } from \"../type/DiscoverView\";\nimport { DiscoverItemType } from \"../../../Enums\";\n\nconst enum Tabs {\n forum,\n edit,\n customerService,\n productionTeam,\n};\n\nconst { ccclass, property } = cc._decorator;\n@ccclass\n@RegView(DiscoverViewType, \"prefab/ui/DiscoverView\")\nexport class DiscoverViewImpl extends CCPureView<DiscoverViewProps> implements DiscoverView {\n //#region editor bindings\n // @property({ type: cc.Label, tooltip: \"人物名字\" })\n // private manName: cc.Label = DummyLabel;\n @property({ type: cc.Label, tooltip: \"人物 ID\" })\n private manId: cc.Label = DummyLabel;\n @property({ type: cc.Sprite, tooltip: \"人物头像\" })\n private menSprite: cc.Sprite = DummySprite;\n @property({ type: cc.Node, tooltip: \"人物根结点\" })\n private infoRootNode: cc.Node = DummyNode;\n @property({ type: cc.Button, tooltip: \"论坛按钮\" })\n private forum: cc.Button = DummyButton;\n\n onLoad() {\n // this.bindProp(\"manName\", this.manName, \"string\");\n this.bindProp(\"manId\", this.manId, \"string\");\n this.bindProp(\"manIcon\", async (value) => {\n if (value != \"\")\n this.menSprite.spriteFrame = await ResUtils.loadRes(value, cc.SpriteFrame);\n });\n\n this.infoRootNode.on(cc.Node.EventType.TOUCH_END, this.onTouchMainInfo, this);\n }\n\n createGameClubBtn = () => {\n this.node.getComponent(cc.Widget).updateAlignment();\n this.node.getComponent(cc.Layout).updateLayout();\n let info = SDK.systemInfo.displayInfo;\n let aspect = info.windowSize.height / cc.view.getVisibleSize().height;\n this.node.getComponent(cc.Widget).updateAlignment();\n\n let pos = this.forum.node.convertToWorldSpaceAR(cc.v2(0, 0));\n pos.x += cc.view.getViewportRect().x / cc.view.getScaleX();\n let xPos = pos.x * aspect;\n let yPos = info.windowSize.height - pos.y * aspect;\n let width = this.forum.node.width * aspect;\n let height = this.forum.node.height * aspect;\n let left = xPos - width / 2;\n let top = yPos - height / 2;\n\n // this.forum.node.active = false;\n SDK.createGameClubButton({\n type: \"text\",\n text: \"\",\n style: {\n left: left,\n top: top,\n width: width,\n height: height\n },\n icon: \"green\"\n });\n }\n\n onForumCallback() {\n\n }\n\n onTabClick(target: cc.Button, data: string) {\n switch (parseInt(data)) {\n case Tabs.forum:\n // GameDotMgr.getInstance().dotClickUI(\"click_forum\");\n this._props.onItemClick(DiscoverItemType.Forum);\n break;\n case Tabs.edit:\n // GameDotMgr.getInstance().dotClickUI(\"click_setting\");\n this._props.onItemClick(DiscoverItemType.Settings);\n break;\n case Tabs.customerService:\n // GameDotMgr.getInstance().dotClickUI(\"click_customerService\");\n this._props.onItemClick(DiscoverItemType.CustomerService);\n break;\n case Tabs.productionTeam:\n this._props.onItemClick(DiscoverItemType.ProductionTeam);\n break;\n }\n }\n\n onPropsLoad(props: Readonly<DiscoverViewProps>) {\n super.onPropsLoad(props);\n }\n\n onPropChange(key: Extract<keyof DiscoverViewProps, string>) {\n super.onPropChange(key);\n }\n\n onTouchMainInfo = () => {\n this._props.onCopyInfo();\n }\n}"]}