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AAC,MAAM,CAAC;gBACtE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,CAAC;gBAEpD,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC;gBACxC,IAAI,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;gBAC1C,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,GAAG,CAAC;gBACnD,IAAI,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,OAAO,CAAC;gBAE5C,IAAI,KAAK,GAAG;oBACR,IAAI,EAAE,KAAK;oBACX,GAAG,EAAE,IAAI;oBACT,KAAK,EAAE,MAAM;oBACb,MAAM,EAAE,OAAO;oBACf,OAAO,EAAE,GAAG;oBACZ,OAAO,EAAE,CAAC;iBACb,CAAA;gBACD,eAAG,CAAC,YAAY,CAAC,KAAK,EAAE,6BAAa,CAAC,8BAA8B,CAAC,CAAC;aACzE;iBAAM;gBACH,eAAG,CAAC,YAAY,EAAE,CAAC;aACtB;QAEL,CAAC;KACJ,CAAA;IArDG;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;0DACa;IAGhC;QADC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC;yDACc;IAGnC;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;wDACU;IARnB,oBAAoB;QAFhC,OAAO;QACP,gCAAO,CAAC,uCAAoB,EAAE,4BAA4B,CAAC;OAC/C,oBAAoB,CAuDhC;IAAD,2BAAC;KAAA;AAvDY,oDAAoB","file":"","sourceRoot":"/","sourcesContent":["import { ExchangeCodeViewType, ExchangeCodeViewProps, ExchangeCodeView } from \"../type/ExChangeCodeView\";\r\nimport { CCPureView } from \"../../../../common/classbase/CCViewBase\";\r\nimport { RegView } from \"../../PresenterCCViewFactory\";\r\nimport { DummyLabel, DummyNode, DymmyEditBox } from \"../../../../common/CCDummyObjects\";\r\nimport { SDK } from \"simba-sdk\";\r\nimport { GameConstData } from \"../../../../common/gameplay/gamedata/GameConstData\";\r\n\r\nconst { ccclass, property } = cc._decorator;\r\n\r\n@ccclass\r\n@RegView(ExchangeCodeViewType, \"prefab/ui/ExchangeCodeView\")\r\nexport class ExchangeCodeViewImpl extends CCPureView<ExchangeCodeViewProps> implements ExchangeCodeView {\r\n @property(cc.Label)\r\n titlelbl: cc.Label = DummyLabel;\r\n\r\n @property(cc.EditBox)\r\n editbox: cc.EditBox = DymmyEditBox;\r\n\r\n @property(cc.Node)\r\n banner: cc.Node = DummyNode;\r\n\r\n setContentTxt(title: string, content: string) {\r\n this.titlelbl.string = title;\r\n this.editbox.string = content;\r\n }\r\n\r\n onLoad() {\r\n }\r\n\r\n onCancleClickCallback() {\r\n this._props.onActionClick(false);\r\n this.showBanner(false);\r\n this.close();\r\n }\r\n\r\n onOkClickCallback() {\r\n this._props.onActionClick(true, this.editbox.string);\r\n this.showBanner(false);\r\n this.close();\r\n }\r\n\r\n showBanner(isShow: boolean) {\r\n if (isShow) {\r\n let info = SDK.systemInfo.displayInfo;\r\n let aspect = info.windowSize.height / cc.view.getVisibleSize().height;\r\n this.node.getComponent(cc.Widget).updateAlignment();\r\n\r\n let _width = this.banner.width * aspect;\r\n let _height = this.banner.height * aspect;\r\n let _left = (info.windowSize.width - _width) * 0.5;\r\n let _top = info.windowSize.height - _height;\r\n\r\n let style = {\r\n left: _left,\r\n top: _top,\r\n width: _width,\r\n height: _height,\r\n anchorX: 0.5,\r\n anchorY: 1,\r\n }\r\n SDK.showBannerAd(style, GameConstData.GAME_CONST_BANNER_REFRESH_TIME);\r\n } else {\r\n SDK.hideBannerAd();\r\n }\r\n\r\n }\r\n}"]}