// /**
// * 第三方登录控件 
// */
// module g2.account_dep{
// 	export class OtherLoginBtnsView extends Laya.View{
//         /**
//          * 登录按钮之间的间距
//          */
//         private static PADDING:number = 10;
//         /**
//          * 隐私协议是否同意回调
//          * 返回:bool,
//          */
//         private m_privacyAgreeHandler:Handler;
// 		/**
//          * 按钮数组
//          */
//         private m_buttons:Array<Laya.Button> = new Array();
// 		constructor(_privacyAgreeHandler:Handler = null){
// 			super();
//             this.m_privacyAgreeHandler = _privacyAgreeHandler;
// 			this.on(Laya.Event.DISPLAY, this, this.onEnter);
//             this.on(Laya.Event.UNDISPLAY, this, this.onExit);
// 		}
// 		private onEnter(){
// 			this.refreshBtns();
// 		}
// 		private onExit(){
//             if(null != this.m_privacyAgreeHandler){
//                 this.m_privacyAgreeHandler.recover();
//                 this.m_privacyAgreeHandler = null;
//             }
// 		}
// 		private refreshBtns(){
//             // 定义错误函数
//             let ERROR:Function = (_msg:string) => {
//                 Log.error(`OtherLoginBtnsView.refreshBtns():${_msg}`);
//             }
// 			// 删除按钮
//             for(let btn of this.m_buttons) {
//                 btn.destroy();
//             }
//             this.m_buttons.splice(0,this.m_buttons.length);
//             // 获取支持的第三方登录
//             let otherLogins:g.common.Set = g.device.GDevice.getOtherLogins();
//             if(null == otherLogins){
//                 ERROR("null other login set");
//                 return;
//             }
//             // 生成按钮
//             let size:number = otherLogins.size();
//             for(let i:number = 0; i < size; i ++){
//                 let accountLoginType:number = otherLogins.get(i);
//                 let btn:Laya.Button = this.makeBtn(accountLoginType);
//                 this.m_buttons.push(btn);
//                 this.addChild(btn);
//             }
//             // 布局
//             // 不使用tableLayout,而使用这种布局,各三方登录可以使用不同的宽度
//             let w:number = 0;
//             let h:number = 0;
//             let prefix:number = 0;
//             for(let btn of this.m_buttons) {
//                 w += prefix;
//                 btn.x = w;
//                 w += btn.width;
//                 prefix = OtherLoginBtnsView.PADDING;
//                 if(btn.height > h) {
//                     h = btn.height;
//                 }
//             }
//             this.size(w,h);
// 		}
// 		/**
//          * 创建按钮
//          * @param _accountLoginType 
//          */
//         private makeBtn(_accountLoginType:number):Laya.Button{
// 			let path:string = "ui/btn_other_login" + _accountLoginType + ".png";
//             let btn:Laya.Button = new Laya.Button(path);
//             btn.on(Laya.Event.CLICK, this, this.onBtnClick, [_accountLoginType]);   // 将_accountLoginType作为参数绑定到回调上
//             return btn;
//         }
//         /**
//          * 返回隐私协议是否同意
//          */
//         private isPrivacyAgreed():boolean {
//             if(null == this.m_privacyAgreeHandler){
//                 return true;
//             }else{
//                 return this.m_privacyAgreeHandler.run();
//             }
//         }
//         /**
//          * 登录按钮点击
//          * @param _accountLoginType 
//          */
//         private onBtnClick(_accountLoginType:number){
//             // 判断隐私协议
//             if(!this.isPrivacyAgreed()){
//                 G2ViewMgr.inst().tip("请仔细阅读游戏用户协议、隐私保护协议，并确认勾选框处于勾选状态.");
//                 return;
//             }
//             switch(_accountLoginType){
//                 case Const.ACCOUNT_LOGIN_TYPE_WX:{
//                     OtherLoginMgr.wxLogin();
//                     break;
//                 }
//                 case Const.ACCOUNT_LOGIN_TYPE_QQ:{
//                     OtherLoginMgr.qqLogin();
//                     break;
//                 }
//                 case Const.ACCOUNT_LOGIN_TYPE_APL:{
//                     OtherLoginMgr.appleLogin();
//                 }
//             }
//         }
// 	}
// }
//# sourceMappingURL=OtherLoginBtnsView.js.map