var GameUI = GameUI || {};
GameUI.VoteList = [];
GameUI.ApplyPlayer = -1;
GameUI.onstate = []; //玩家状态位置为显示位置 
GameUI.isprepare = []; //玩家准备状态显示 
GameUI.Mem = {};
//GameUI.Mem.headSize = [0,0];
GameUI.Mem.snrOption = {
	min: 1000,
	max: 4000,
	unit: 100,
	slider: 0,
	start_x: 0,
	end_x: 0,
	unit_px: 0,
	count: 0,
	number: 0,
	roomcode_number: -1,
	roomcode_string: "",
	number_1: 26,
	number_2: 19.6,
	number_3: 28,
	number_4: 18,
	infinite: 0,
	videoConfig: null,
	tea: 0,
	rebateType: 0,
	sysRebate:0,
	rebateLimit:0,
	forbidSelect:0
};
GameUI.utlani_doend = function(id, sx, count, allend) {
	//logmessage(id+"/"+sx+"/"+count+"/"+allend);
	if (id >= 274 && id <= 278 && sx == 43 && allend == 1) {
		set_self(id, 37, 0, 0, 0);
	}
	if (id >= 292 && id <= 306 && sx == 43 && allend == 1) {
		set_self(id, 37, 0, 0, 0);
	}
	if (id >= 498 && id <= 507 && sx == 43 && allend == 1) { //关闭表情显示 
		set_self(id, 37, 0, 0, 0);
		set_self(id - 30, 37, 0, 0, 0);
	}
	if (id >= 552 && id <= 561 && sx == 43 && allend == 1) { //关闭文字聊天 
		set_self(id, 37, 0, 0, 0);
		set_self(id + 30, 37, 0, 0, 0);
	}
	if (id == 390 && sx == 18 && allend == 1) { //游戏公告 
		GameData.isBoardcast = false;
		GameUI.playBroadcast();
	}
	//if(id == 11 && sx == 43 && allend == 1){//创建房间 
	//play_ani(1,12,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//加入房间
	//}
	//if(id == 12 && sx == 43 && allend == 1){//创建房间
	//play_ani(1,568,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//星星场
	//}
	//if(id == 568 && sx == 43 && allend == 1){//创建房间
	//play_ani(1,483,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//比赛场
	//}
	//if(id == 483 && sx == 43 && allend == 1){//创建房间
	//GameData.mainMenuAniTimer = setTimeout(function(){
	//play_ani(1,11,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//加入房间
	//},ConstVal.Animation.deltaTime);
	//}


};
GameUI.utlgamebegindraw = function(gameid, spid, times, timelong) {

};
GameUI.onloadurl = function(recid, rectype, url, error, count, len) {
	GameData.LoadCount = count;
	if (rectype == 0) {
		ifast_loadsprite([1, 254, 3104, 3103]);
	}
	if (count == 0) {

	}
	try {
		if (ifast_checkimg(21) && !GameData.launchImgLoaded && GameData.configSuccess && GameData.hallConfig.launchImgUrl) {
			//console.log(GameData.hallConfig);

			Func.up_imgurl(21, GameData.hallConfig.launchImgUrl);
			GameData.launchImgLoaded = true;
		}
	} catch (e) {

	}
	if (count == 100 && GameData.isLoad) {
		//var ttext = get_self(3104,7,0,0)+"  跳过";
		//set_self(3104,7,ttext,0,0);
		//set_self(3104,20,ttext.gblen()*12,0,0);
		//GameUI.adaptPositionSpid(3104,3103);
		//GameUI.adaptPositionSpid(3104,3103);
		GameData.isLoad = false;
		if (GameData.LaunchMode == ConstVal.Launch_mode.from_hall) {
			set_self(465, 37, 1, 0, 0);
		}
		//if(ConstVal.netType == 0){
		if (GameData.Timesup && GameData.firstConnect_Succ && GameData.getJSONState) {
			GameUI.JumpWxAuth();

		} else {
			set_self(254, 37, 0, 0, 0);
		}
		//}else{
		//if(GameData.Timesup && GameData.getJSONState){
		//GameUI.JumpWxAuth();

		//}else{
		//set_self(254,37,0,0,0);
		//}
		//}

	}
}
GameUI.utlmousedown = function(gameid, spid, downx, downy, no1, no2, no3, no4, no5, no6) {
	//点击代码
	for (var i = 0; i < ClickBtn.length; i++) {
		if (spid == ClickBtn[i]) {
			set_self(ClickBtn[i], 35, 200, 0, 0);
			set_self(ClickBtn[i], 33, 105, 0, 0);
			//Utl.playSound(Game_Config.soundList.Button);
		}
	}
	if (spid >= 29 && spid <= 40) {
		set_self(spid, 35, 200, 0, 0);
	}
	if (spid == 152) {
		Func.prepareAudio();
		//getaudiourl("aaaaa",2);
	}
	switch (spid) {
	case 52:

		break;
	case ConstVal.Emotion.f_spid:
		GameData.slidEmotion = false;
		break;
	case ConstVal.Com_History.f_spid:
		GameData.slideHistory = false;
		break;
	case ConstVal.Task.f_spid:
		GameData.slideTask = false;
		break;
	case ConstVal.worldRoom.f_sp_1:
		GameData.worldRoomSysSlide = false;
		break;
	case ConstVal.worldRoom.f_sp_2:
		GameData.worldRoomPlySlide = false;
		break;
	case ConstVal.snrRoomList.f_spid:
		GameData.snrRoomListSlide = false;
		break;
	case ConstVal.rankList.f_spid:
		GameData.rankListSlide = false;
		break;
	case 3102:
	case 3105:
	case 3106:
		GameData.imgAdIsSlide = false;
		break;
	case ConstVal.vipRoomList1.f_spid:
		GameData.vipRoomPageOne.slide = false;
		break;
	case ConstVal.vipRoomList2.f_spid:
		GameData.vipRoomPageTwo.slide = false;
	case ConstVal.blackList.f_spid:
		GameData.blackList.slide = false;
		break;
	case ConstVal.vipRank.f_spid:
		GameData.vipRank.slide = false;
		break;
	case ConstVal.whiteList.f_spid:
		GameData.whiteList.slide = false;
		break;

	}

};
GameUI.utlmousedown_nomove = function(gameid, spid, downx, downy, timelong, no1, no2, no3, no4, no5) {
	//点击代没移动代码



};
GameUI.utlmouseup = function(gameid, spid_down, downx, downy, spid_up, upx, upy, timelong, no1, no2) {
	//点击弹起代码
	//可以通过spid_down和spid_up 的比较 来判断是 点击还是 移动
	for (var i = 0; i < ClickBtn.length; i++) {
		if (spid_down == ClickBtn[i]) {
			set_self(ClickBtn[i], 35, 255, 0, 0);
			set_self(ClickBtn[i], 33, 100, 0, 0);
		}
	}
	for (var i = 0; i < ConstVal.soudsSpidList.length; i++) {
		if (spid_down == ConstVal.soudsSpidList[i]) {
			Utl.playSound(Game_Config.ClickButton.src_1);
		}
	}
	if (spid_down >= 29 && spid_down <= 40) {
		set_self(spid_down, 35, 255, 0, 0);
	}
	if (spid_down == 252) {
		var pos = get_self(252, 19, 0, 0, 0);
		var h = get_self(252, 21, 0, 0, 0);
		if (pos > Game_Config.Protocol.y) {
			var t = pos - Game_Config.Protocol.y;
			play_ani(1, 252, 19, pos, Game_Config.Protocol.y, 0, t, 0, 0, 0, 1, 0, 0, 0);
		} else if (pos < Game_Config.Protocol.y + Game_Config.Protocol.h - h) {
			var t = Game_Config.Protocol.y + Game_Config.Protocol.h - pos - h;
			play_ani(1, 252, 19, pos, Game_Config.Protocol.y + Game_Config.Protocol.h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);
		}
	}
	if (spid_down == 290) {
		var pos = get_self(290, 19, 0, 0, 0);
		var h = get_self(290, 21, 0, 0, 0);
		if (pos > Game_Config.Help.y) {
			var t = pos - Game_Config.Help.y;
			play_ani(1, 290, 19, pos, Game_Config.Help.y, 0, t, 0, 0, 0, 1, 0, 0, 0);
		} else if (pos < Game_Config.Help.y + Game_Config.Help.h - h) {
			var t = Game_Config.Help.y + Game_Config.Help.h - pos - h;
			play_ani(1, 290, 19, pos, Game_Config.Help.y + Game_Config.Help.h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);

		}
	}
	if (spid_down == 404) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		var h = get_self(spid_down, 21, 0, 0, 0);
		var s_height = get_self(spid_down, 21, 0, 0, 0);
		if (pos > ConstVal.Notice.clip_y) {
			var t = pos - ConstVal.Notice.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.Notice.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);
			play_ani(1, 81, 19, pos, ConstVal.Notice.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);
		} else if (pos < ConstVal.Notice.clip_y + ConstVal.Notice.clip_h - h) {

			if (ConstVal.Notice.clip_h < s_height) {
				var t = ConstVal.Notice.clip_y + ConstVal.Notice.clip_h - pos - h;
				play_ani(1, spid_down, 19, pos, ConstVal.Notice.clip_y + ConstVal.Notice.clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);
				play_ani(1, 81, 19, pos, ConstVal.Notice.clip_y + ConstVal.Notice.clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);
			} else {
				var t = ConstVal.Notice.clip_y - pos;
				play_ani(1, spid_down, 19, pos, ConstVal.Notice.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);
				play_ani(1, 81, 19, pos, ConstVal.Notice.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);
			}
		}
	}
	if (spid_down == 3102 || spid_down == 3105 || spid_down == 3106) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		var h = get_self(spid_down, 21, 0, 0, 0);
		var s_height = get_self(spid_down, 21, 0, 0, 0);
		if (pos > ConstVal.Notice.img_clip_y) {
			var t = pos - ConstVal.Notice.img_clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.Notice.img_clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);
			play_ani(1, 81, 19, pos, ConstVal.Notice.img_clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);
		} else if (pos < ConstVal.Notice.img_clip_y + ConstVal.Notice.img_clip_h - h) {

			if (ConstVal.Notice.img_clip_h < s_height) {
				var t = ConstVal.Notice.img_clip_y + ConstVal.Notice.img_clip_h - pos - h;
				play_ani(1, spid_down, 19, pos, ConstVal.Notice.img_clip_y + ConstVal.Notice.img_clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);
				play_ani(1, 81, 19, pos, ConstVal.Notice.img_clip_y + ConstVal.Notice.img_clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);
			} else {
				var t = ConstVal.Notice.img_clip_y - pos;
				play_ani(1, spid_down, 19, pos, ConstVal.Notice.img_clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);
				play_ani(1, 81, 19, pos, ConstVal.Notice.img_clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);
			}
		}
	}
	if (spid_down == ConstVal.Emotion.f_spid) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		if (pos > ConstVal.Emotion.clip_y) {
			var t = pos - ConstVal.Emotion.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.Emotion.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else {
			if (Math.ceil(ConstVal.Emotion.count / ConstVal.Emotion.col_num) <= 4) {
				if (pos < ConstVal.Emotion.clip_y) {
					var t = ConstVal.Emotion.clip_y - pos;
					play_ani(1, spid_down, 19, pos, ConstVal.Emotion.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			} else {
				var dis = ConstVal.Emotion.clip_y + 4 * (ConstVal.Emotion.h + ConstVal.Emotion.dis_y) - Math.ceil(ConstVal.Emotion.count / ConstVal.Emotion.col_num) * (ConstVal.Emotion.h + ConstVal.Emotion.dis_y);
				if (pos < dis) {
					var t = dis - pos;
					play_ani(1, spid_down, 19, pos, dis, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			}
		}
	}
	if (spid_down == ConstVal.Com_History.f_spid) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		if (pos > ConstVal.Com_History.clip_y) {
			var t = pos - ConstVal.Com_History.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.Com_History.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else {
			if (ConstVal.Com_History.page_count >= GameData.createHistoryLen) {
				if (pos < ConstVal.Com_History.clip_y) {
					var t = ConstVal.Com_History.clip_y - pos;
					play_ani(1, spid_down, 19, pos, ConstVal.Com_History.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			} else {
				var dis = ConstVal.Com_History.clip_y + ConstVal.Com_History.page_count * (ConstVal.Com_History.head_h + ConstVal.Com_History.head_dis_y) - GameData.createHistoryLen * (ConstVal.Com_History.head_h + ConstVal.Com_History.head_dis_y);
				//var dis = 
				if (pos < dis) {
					var t = dis - pos;
					play_ani(1, spid_down, 19, pos, dis, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			}
		}
	}
	if (spid_down == ConstVal.Task.f_spid) {

		var pos = get_self(spid_down, 18, 0, 0, 0);
		if (pos > ConstVal.Task.clip_x) {
			var t = pos - ConstVal.Task.clip_x;
			play_ani(1, spid_down, 18, pos, ConstVal.Task.clip_x, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else {
			if (TaskInfo.length <= 4) {
				if (pos < ConstVal.Task.clip_x) {
					var t = ConstVal.Task.clip_x - pos;
					play_ani(1, spid_down, 18, pos, ConstVal.Task.clip_x, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			} else {
				var dis = ConstVal.Task.clip_x + (4 - TaskInfo.length) * (ConstVal.Task.bg_dis_x + ConstVal.Task.bg_w);

				if (pos < dis) {
					var t = dis - pos;
					play_ani(1, spid_down, 18, pos, dis, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			}
		}
	}

	if (spid_down == ConstVal.worldRoom.f_sp_1) {

		var pos = get_self(spid_down, 19, 0, 0, 0);
		var sh = get_self(spid_down, 21, 0, 0, 0);
		if (pos > ConstVal.worldRoom.clip_y_1) {
			var t = pos - ConstVal.worldRoom.clip_y_1;
			play_ani(1, spid_down, 19, pos, ConstVal.worldRoom.clip_y_1, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else {
			if (sh < ConstVal.worldRoom.clip_h_1) {
				//if(pos < ConstVal.worldRoom.clip_y_1){
				var t = ConstVal.worldRoom.clip_y_1 - pos;
				play_ani(1, spid_down, 19, pos, ConstVal.worldRoom.clip_y_1, 0, t, 0, 0, 0, 1, 0, 0, 0);

				//}
			} else {
				//var Width = ConstVal.worldRoom.bg_sp_space_1+get_self(ConstVal.worldRoom.bg_sp_1,20,0,0,0);
				//var dis = ConstVal.worldRoom.clip_x_1+(4-GameData.worldRoomSys.length)*Width;
				var dis = ConstVal.worldRoom.clip_y_1 + ConstVal.worldRoom.clip_h_1 - sh;
				if (pos < dis) {
					var t = dis - pos;
					play_ani(1, spid_down, 19, pos, dis, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			}
		}
	}
	if (spid_down == ConstVal.worldRoom.f_sp_2) {
		var bg_height = get_self(spid_down, 21, 0, 0);
		var pos = get_self(spid_down, 19, 0, 0, 0);
		if (pos > ConstVal.worldRoom.clip_y_2) {
			var t = pos - ConstVal.worldRoom.clip_y_2;
			play_ani(1, spid_down, 19, pos, ConstVal.worldRoom.clip_y_2, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else {
			if (bg_height < ConstVal.worldRoom.clip_h_2) {
				if (pos < ConstVal.worldRoom.clip_y_2) {
					var t = ConstVal.worldRoom.clip_y_2 - pos;
					play_ani(1, spid_down, 19, pos, ConstVal.worldRoom.clip_y_2, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			} else {
				//var height = ConstVal.worldRoom.bg_sp_space_2+get_self(ConstVal.worldRoom.bg_sp_2,21,0,0,0);
				//var dis = ConstVal.worldRoom.clip_x_2+(4-GameData.worldRoomPly.length)*Width;
				var dis = ConstVal.worldRoom.clip_h_2 + ConstVal.worldRoom.clip_y_2 - bg_height;
				if (pos < dis) {
					var t = dis - pos;
					play_ani(1, spid_down, 19, pos, dis, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			}
		}
	}
	if (spid_down == ConstVal.snrRoomList.f_spid) {

		var pos = get_self(spid_down, 19, 0, 0, 0);
		if (pos > ConstVal.snrRoomList.clip_y) {
			var t = pos - ConstVal.snrRoomList.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.snrRoomList.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else {
			if (GameData.snrRoomList.roomlist.length <= 3) {
				if (pos < ConstVal.snrRoomList.clip_y) {
					var t = ConstVal.snrRoomList.clip_y - pos;
					play_ani(1, spid_down, 19, pos, ConstVal.snrRoomList.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			} else {
				var Width = ConstVal.snrRoomList.bg_space + get_self(ConstVal.snrRoomList.bg_spid, 21, 0, 0, 0);
				var dis = ConstVal.snrRoomList.clip_y + (3 - GameData.snrRoomList.roomlist.length) * Width;

				if (pos < dis) {
					var t = dis - pos;
					play_ani(1, spid_down, 19, pos, dis, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			}
		}
	}
	if (spid_down == ConstVal.rankList.f_spid) {

		var pos = get_self(spid_down, 19, 0, 0, 0);
		if (pos > ConstVal.rankList.clip_y) {
			var t = pos - ConstVal.rankList.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.rankList.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else {
			if (GameData.rankList.length <= 5) {
				if (pos < ConstVal.rankList.clip_y) {
					var t = ConstVal.rankList.clip_y - pos;
					play_ani(1, spid_down, 19, pos, ConstVal.rankList.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			} else {
				var Width = ConstVal.rankList.space + get_self(ConstVal.rankList.bg_spid, 21, 0, 0, 0);
				var dis = ConstVal.rankList.clip_y + (5 - GameData.rankList.length) * Width;

				if (pos < dis) {
					var t = dis - pos;
					play_ani(1, spid_down, 19, pos, dis, 0, t, 0, 0, 0, 1, 0, 0, 0);

				}
			}
		}
	}
	if (spid_down == ConstVal.sysNotice.f_spid) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		var h = get_self(spid_down, 21, 0, 0, 0);
		var s_height = get_self(spid_down, 21, 0, 0, 0);
		if (pos > ConstVal.sysNotice.clip_y) {
			var t = pos - ConstVal.sysNotice.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.sysNotice.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else if (pos < ConstVal.sysNotice.clip_y + ConstVal.sysNotice.clip_h - h) {

			if (ConstVal.sysNotice.clip_h < s_height) {
				var t = ConstVal.sysNotice.clip_y + ConstVal.sysNotice.clip_h - pos - h;
				play_ani(1, spid_down, 19, pos, ConstVal.sysNotice.clip_y + ConstVal.sysNotice.clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);

			} else {
				var t = ConstVal.sysNotice.clip_y - pos;
				play_ani(1, spid_down, 19, pos, ConstVal.sysNotice.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

			}
		}
	}
	if (spid_down == ConstVal.vipRoomList1.f_spid) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		var h = get_self(spid_down, 21, 0, 0, 0);
		var s_height = get_self(spid_down, 21, 0, 0, 0);
		if (pos > ConstVal.vipRoomList1.clip_y) {
			var t = pos - ConstVal.vipRoomList1.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.vipRoomList1.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else if (pos < ConstVal.vipRoomList1.clip_y + ConstVal.vipRoomList1.clip_h - h) {

			if (ConstVal.vipRoomList1.clip_h < s_height) {
				var t = ConstVal.vipRoomList1.clip_y + ConstVal.vipRoomList1.clip_h - pos - h;
				play_ani(1, spid_down, 19, pos, ConstVal.vipRoomList1.clip_y + ConstVal.vipRoomList1.clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);

			} else {
				var t = ConstVal.vipRoomList1.clip_y - pos;
				play_ani(1, spid_down, 19, pos, ConstVal.vipRoomList1.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

			}
		}
	}
	if (spid_down == ConstVal.vipRoomList2.f_spid) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		var h = get_self(spid_down, 21, 0, 0, 0);
		var s_height = get_self(spid_down, 21, 0, 0, 0);
		if (pos > ConstVal.vipRoomList2.clip_y) {
			var t = pos - ConstVal.vipRoomList2.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.vipRoomList2.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else if (pos < ConstVal.vipRoomList2.clip_y + ConstVal.vipRoomList2.clip_h - h) {

			if (ConstVal.vipRoomList2.clip_h < s_height) {
				var t = ConstVal.vipRoomList2.clip_y + ConstVal.vipRoomList2.clip_h - pos - h;
				play_ani(1, spid_down, 19, pos, ConstVal.vipRoomList2.clip_y + ConstVal.vipRoomList2.clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);

			} else {
				var t = ConstVal.vipRoomList2.clip_y - pos;
				play_ani(1, spid_down, 19, pos, ConstVal.vipRoomList2.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

			}
		}
	}
	if (spid_down == ConstVal.blackList.f_spid) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		var h = get_self(spid_down, 21, 0, 0, 0);
		var s_height = get_self(spid_down, 21, 0, 0, 0);
		if (pos > ConstVal.blackList.clip_y) {
			var t = pos - ConstVal.blackList.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.blackList.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else if (pos < ConstVal.blackList.clip_y + ConstVal.blackList.clip_h - h) {

			if (ConstVal.blackList.clip_h < s_height) {
				var t = ConstVal.blackList.clip_y + ConstVal.blackList.clip_h - pos - h;
				play_ani(1, spid_down, 19, pos, ConstVal.blackList.clip_y + ConstVal.blackList.clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);

			} else {
				var t = ConstVal.blackList.clip_y - pos;
				play_ani(1, spid_down, 19, pos, ConstVal.blackList.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

			}
		}
	}
	if (spid_down == ConstVal.whiteList.f_spid) {
		var pos = get_self(spid_down, 19, 0, 0, 0);
		var h = get_self(spid_down, 21, 0, 0, 0);
		var s_height = get_self(spid_down, 21, 0, 0, 0);
		if (pos > ConstVal.whiteList.clip_y) {
			var t = pos - ConstVal.whiteList.clip_y;
			play_ani(1, spid_down, 19, pos, ConstVal.whiteList.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else if (pos < ConstVal.whiteList.clip_y + ConstVal.whiteList.clip_h - h) {

			if (ConstVal.whiteList.clip_h < s_height) {
				var t = ConstVal.whiteList.clip_y + ConstVal.whiteList.clip_h - pos - h;
				play_ani(1, spid_down, 19, pos, ConstVal.whiteList.clip_y + ConstVal.whiteList.clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);

			} else {
				var t = ConstVal.whiteList.clip_y - pos;
				play_ani(1, spid_down, 19, pos, ConstVal.whiteList.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

			}
		}
	}
	if (spid_down == ConstVal.vipRank.f_spid) {
		var config = ConstVal.vipRank;
		var pos = get_self(spid_down, 19, 0, 0, 0);
		var h = get_self(spid_down, 21, 0, 0, 0);
		var s_height = get_self(spid_down, 21, 0, 0, 0);
		if (pos > config.clip_y) {
			var t = pos - config.clip_y;
			play_ani(1, spid_down, 19, pos, config.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

		} else if (pos < config.clip_y + config.clip_h - h) {

			if (config.clip_h < s_height) {
				var t = config.clip_y + config.clip_h - pos - h;
				play_ani(1, spid_down, 19, pos, config.clip_y + config.clip_h - h, 0, t, 0, 0, 0, 1, 0, 0, 0);

			} else {
				var t = config.clip_y - pos;
				play_ani(1, spid_down, 19, pos, config.clip_y, 0, t, 0, 0, 0, 1, 0, 0, 0);

			}
		}
	}
	if (spid_down == 597) {
		GameUI.seniorOptionsSlideEnd(gameid, spid_down, downx, downy, spid_up, upx, upy, timelong, no1, no2);
	}
	if (spid_down == spid_up) {
		if(GameData.sysConfig.behaviorList){
			for(var k=0;k<GameData.sysConfig.behaviorList.length;k++){
				if(spid_up == Number(GameData.sysConfig.behaviorList[k][0])){//点击精灵在列表中 
					try{
						Net.Send_playerBehavior(GameData.sysConfig.behaviorList[k][1]);
					}catch(e){
						
					}
				}
			}
		}
		switch (spid_up) {

		case 283:
			GameUI.showCal();
			break;
		case 58:
			if(GameData.LaunchMode != ConstVal.Launch_mode.from_hall){
				//退出登录
				GameData.isLogin = false;
				GameData.isBoard = true;
				GameData.loginPlayerid = false;
				GameData.hallLogin = true;
				Utl.delCookie(Utl.Config.wxinfo);
				Utl.delCookie(Utl.Config.devicePlayer);
				GameUI.JumpWxAuth();
				if (GameData.hallConfig.logoffCallback == 1) {
					Func.logoffCallback();
				}
			}else{
				GameUI.OpenTips("请返回游戏大厅退出登录", ConstVal.Tips.time);
			}
			break;
		case 3:
			//微信授权 
			if (GameData.ProtocolIndex) {
				Logic.savePlayerId("");
				//this.StartLoad();
				Func.accreditlogin();
				GameData.submitAddressBook = false;

			} else {
				GameUI.OpenTips("未同意协议", ConstVal.Tips.time);
			}
			break;
		case 5:
			{
				Utl.playSound(Game_Config.ClickButton.src_2);
				GameUI.OpenBoard();
			}
			break;
		case 15:
			//打开反馈 
			{
				GameUI.closePallet();
				GameData.feedMode = 1;
				GameUI.OpenFeedback();
			}
			break;
		case 234:
			
			if (GameData.LaunchMode == ConstVal.Launch_mode.from_hall) {
				
				backgameData();

			} else {
				Func.browser(Game_Config.Share.appdownload);
			}
			break;

		case 548:
			GameUI.CloseFeedback();
			break;
		case 550:
			var text = GameUI.getFeedbackText();
			var bTemp = Func.strisNull(text);
			if (!bTemp) {
				GameUI.CloseFeedback();
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.content = text;
				Net.Send_submit_opinion(data);
				
			}
			break;
		case 77:
		case 80:
			//关闭消息
			{
				if (GameData.hallConfig.worldRoomList && GameData.isShowWorldRoomList && GameData.hallConfig.autoWorldRoomList) { //显示星星争霸场
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					Net.Send_get_share_room(data);
				} else {
					GameUI.CloseBoard();
				}

			}
			break;
		case 9:
			//打开个人信息 
			{

				this.OpenInfo_hall();
			}
			break;
		case 116:
			//关闭个人信息
			{
				this.CloseInfo_hall();
			}
			break;
		case 215:
			//关闭个人信息
			{
				this.CloseInfo();
			}
			break;
		case 357:
			GameUI.ClickShake();
			break;
		case 388:
			GameUI.ClickVoice();
			break;
		case 141:
			//关闭帮助
		case 47:
			this.CloseHelp();
			break;
		case 11:
			//打开创建房间 
			Game_Modify.OpenCreateRoom();
			break;
		case 3184:
			//if(!Game_Config.sysConfig.vipInfinite){
				GameUI.closeVipRoomList();
				Game_Modify.OpenCreateRoom();
			//}else{
				//GameUI.closeVipRoomList();
			//}
			break;
		case 12:
			//打开加入房间 
			this.OpenJoinRoom();
			break;
		case ConstVal.Task.f_spid:
			//点击任务 
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.slideTask) {
				if (up_id >= ConstVal.Task.get_reward_btn_tag && up_id < ConstVal.Task.isreward_tag) {
					//console.log(TaskInfo[up_id - ConstVal.Task.get_reward_btn_tag]);
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.taskid = TaskInfo[up_id - ConstVal.Task.get_reward_btn_tag].taskid;
					Net.Send_get_task_award(data);
				}
				if (up_id == ConstVal.Task.tofinish_btn_tag) {
					this.CloseTask();
					this.OpenShare();
				}
			}


			break;
		case 17:
			//打开任务
			var data = {};
			data.agentid = GameData.AgentId;
			data.gameid = GameData.GameId;
			data.playerid = C_Player.playerid;
			Net.Send_get_player_task(data);
			break;
		case 115:
			//关闭任务
		case 112:
			this.CloseTask();
			break;
		case 18:
			//关闭创建房间 
		case 60:
			Game_Modify.CloseCreateRoom();
			break;
		case 27:
			//关闭加入房间
		case 59:
			this.CloseJoinRoom();
			break;
		case 43:
			this.ClickBgm();
			break;
			//点击音效按钮 
		case 44:
			this.ClickSound();
			break;
		case 7:
			//打开设置 
			{

				this.OpenSetting(0);
			}
			break;
		case 42:
			//关闭设置 
		case 47:
			{
				this.CloseSetting();
			}
			break;
		case 177:
			{

				Func.visitorLogin();

			}
			break;


		case ConstVal.Emotion.f_spid:
			//点击表情
			var obj = gameabc_face.getdiv("div204");
			obj.blur();
			obj = null;
			if (upx >= ConstVal.Emotion.clip_x && upx <= ConstVal.Emotion.clip_x + ConstVal.Emotion.clip_w && upy >= ConstVal.Emotion.clip_y && upy <= ConstVal.Emotion.clip_h + ConstVal.Emotion.clip_y) {
				if (!GameData.slidEmotion) {
					var up_id = ifast_check_add(spid_up, upx, upy);
					if (up_id >= 1 && up_id <= ConstVal.Emotion.count) {
						var data = {};
						data.agentid = GameData.AgentId;
						data.gameid = GameData.GameId;
						data.playerid = C_Player.playerid;
						data.roomcode = Desk.roomcode;
						data.text = up_id;
						if (GameData.chatInfo) {
							data.info = GameData.chatInfo;
							data.type = 2;
						}
						Net.Send_send_phiz(data);
					}
				}
			}
		case ConstVal.Com_History.f_spid:
			//点击历史记录 
			var obj = gameabc_face.getdiv("div204");
			obj.blur();
			obj = null;
			if (upx >= ConstVal.Com_History.clip_x && upx <= ConstVal.Com_History.clip_x + ConstVal.Com_History.clip_w && upy >= ConstVal.Com_History.clip_y && upy <= ConstVal.Com_History.clip_h + ConstVal.Com_History.clip_y) {
				if (!GameData.slideHistory) {
					var up_id = ifast_check_add(spid_up, upx, upy);
					if (up_id >= ConstVal.Com_History.bubble_tag && up_id <= ConstVal.Com_History.content_tag) {
						console.log(GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag]);
						if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][1] == 1) { //文字 

							if (GameData.isService) {
								var sp = ConstVal.Com_History.f_spid + "add" + up_id;
								if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]) {
									//GameData.chatLine =[0,10,50,10];
									GameData.chatLine = [get_self(sp, 18, 0, 0, 0), get_self(sp, 19, 0, 0, 0) - 10, get_self(sp, 20, 0, 0, 0), get_self(sp, 21, 0, 0, 0), sp, 1];
									GameData.chatInfo = GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4];
								} else {
									GameUI.OpenTips("此消息为本桌消息", ConstVal.Tips.time);
								}

							} else {
								set_self(204, 7, GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2]);
							}
						} else {
							if (!GameData.isService) {
								var iid = ConstVal.Com_History.content_tag - ConstVal.Com_History.bubble_tag + up_id;
								GameUI.play_voice(GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2], 2, iid);
							} else {
								var sp = ConstVal.Com_History.f_spid + "add" + up_id;
								if (GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4]) {
									GameData.chatLine = [get_self(sp, 18, 0, 0, 0), get_self(sp, 19, 0, 0, 0) - 10, get_self(sp, 20, 0, 0, 0), get_self(sp, 21, 0, 0, 0), sp, 2];
									GameData.chatInfo = GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][4];
								} else {
									GameUI.OpenTips("此消息为本桌消息", ConstVal.Tips.time);
								}
								//console.log("GameUI.play_voice:"+GameData.communionHistory[up_id - ConstVal.Com_History.bubble_tag][2]+"  2  "+iid);
							}
							// var p_spid = ConstVal.Com_History.f_spid+"add"+iid;


						}
					} else {
						GameData.chatInfo = null;
						GameData.chatLine = null;
					}
				}
			}

			break;

		case 14:
			//打开分享 
			{
				this.OpenShare();
			}
			break;
		case 72:
			//关闭分享
			{
				this.CloseShare();
			}
			break;
		case 74:
			//分享微信好友
			{
				
				Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title, Game_Config.Share.description);
				
				this.CloseShare();
			}
			break;
		case 75:
			//分享微信朋友圈
			{
				if (!GameData.hallConfig.shareType) {
					
				} else {
					console.log(GameData.hallConfig.shareImgUrl);
					Func.sharefinend(2, 3, GameData.hallConfig.shareImgUrl);
				}
				this.CloseShare();
			}
			break;
		case 125:
			//做任务一按钮 

			this.CloseTask();
			this.OpenShare();
			break;
		case 128:
			//做任务二按钮

			break;
		case 10:
			//打开充值提示
		case 286:
		case 508:
		case 509:
		case 287:
		case 3161:
		case 3162:
		case 496:
			var type = 1;
			if (spid_up == 508 || spid_up == 509 || spid_up == 3162 || spid_up == 496) {
				type = 2;
			}
			if (!GameData.h5Version) {
				Utl.playSound(Game_Config.ClickButton.src_1);
				if (GameData.agentmode == 2 || GameData.agentmode == 3) {
					//console.log(GameData.AgentId+"、"+GameData.ChannelId+"、"+GameData.marketID+"、"+C_Player.playerid);agentid、channelid、marketid、playerid
					if (GameData.versionState == 0) {
						if (!GameData.h5Version) {
							if (!GameData.hallConfig.androidPay) {
								switch (GameData.agentmode) {
								case 2:
									if (GameData.TopUpUrl) {
										Func.browser(GameData.TopUpUrl + "?agentid=" + GameData.AgentId + "&channelid=" + GameData.ChannelId + "&marketid=" + GameData.marketID + "&playerid=" + C_Player.playerid);
									} else {
										if (GameData.hallConfig.enablePay) {
											var data = {};
											data.agentid = GameData.AgentId;
											Net.Send_get_paylist(data);
										}
									}
									break;
								case 3:
									if (GameData.hallConfig.channelKey) {
										try {
											//var type = 1;
											//if(spid_up==509||spid_up==508){
											//type=2;
											//}
											pop_intZhifuMadal(GameData.AgentId, GameData.ChannelId, C_Player.playerid, type, GameData.hallConfig.channelKey, 2, 0, C_Player.openid, C_Player.unionid);
											//pop_zhifuMadal();
										} catch (e) {}
									} else {

									}
									break;
								}


							} else {
								if (GameData.OS == ConstVal.OS.android) {
									//var type = 1;
									//if(spid_up==509||spid_up==508){
									//type=2;
									//}
									Func.ypayType(type);
								}
							}
						} else {
							var data = {};
							data.agentid = GameData.AgentId;
							Net.Send_get_paylist(data);
						}
					}
				} else {
					if (GameData.sysConfig.h5PayUrl) {
						var url = GameData.sysConfig.h5PayUrl + "?agentid" + GameData.AgentId + "&channelid" + GameData.ChannelId;
						window.location.href = fixUrl(url);
					}

				}
			}
			break;
		case 146:
			//关闭充值提示 
			this.CloseCharge();
			break;
		case 233:
			//退出房间
		case 3145:
			GameUI.closeMainSceneBtnPanel();
			if (Desk.infinite == 0) {
				if (C_Player.status == 1) {
					GameData.checkType = 2;
					GameUI.openCheck("房间仍存在，是否退出？");
				} else {
					var data = {};
					data.agentid = GameData.AgentId;
					data.gameid = GameData.GameId;
					data.playerid = C_Player.playerid;
					data.roomcode = Desk.roomcode;
					Net.Send_self_exit_room(data);
				}
			} else {
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.roomcode = Desk.roomcode;
				Net.Send_self_exit_room(data);
			}
			break;

		case 181:
			//申请解散房间/退出房间 
			if (C_Player.canexit == 1) { //未开局
				if (Desk.infinite == 0) {

					if (C_Player.status == 2) {
						var data = {};
						data.agentid = GameData.AgentId;
						data.gameid = GameData.GameId;
						data.playerid = C_Player.playerid;
						data.roomcode = Desk.roomcode;
						Net.Send_self_exit_room(data);
					} else {
						GameUI.CloseSetting();
						var c_msg = "";
						if (GameData.versionState == 1) {

							c_msg = "       是否解散房间？？";
						} else {
							c_msg = "解散房间不扣" + GameData.roomCardName + "，是否解散？";
						}
						GameData.checkType = 1;
						GameUI.openCheck(c_msg);

					}
				} else {
					var data = {};
					data.agentid = GameData.AgentId;
					data.gameid = GameData.GameId;
					data.playerid = C_Player.playerid;
					data.roomcode = Desk.roomcode;
					Net.Send_self_exit_room(data);
				}

			} else {
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.roomcode = Desk.roomcode;
				Net.Send_self_apply_free_room(data);
			}
			break;
		case 182:
			//邀请好友
		case 183:
			
			if(!GameData.sysConfig.appShareH5){
				Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title + Desk.videoDes + Game_Config.Share.gameTitle + GameData.shareMsg, Game_Config.Share.gameDescription);
			}else{
				Func.sharefinend(1, 1, GameData.sysConfig.appShareH5, Game_Config.Share.title + Desk.videoDes + Game_Config.Share.gameTitle + GameData.shareMsg, Game_Config.Share.gameDescription);
			}
			

			break;
		case 151:
			//打开游戏主界面设置
			GameUI.OpenSetting(1);
			break;
		case 184:
			//开始按钮
			//this.StartLoad();
			var data = {};
			data.agentid = GameData.AgentId;
			data.gameid = GameData.GameId;
			data.playerid = C_Player.playerid;
			data.roomcode = Desk.roomcode;
			Net.Send_self_makewar(data);
			break;
		case 185:
			//解散
		case 3144:
			if (Desk.stage == 0) {
				var c_msg = "";
				if (GameData.versionState == 1) {

					c_msg = "       是否解散房间？";
				} else {
					c_msg = "解散房间不扣" + GameData.roomCardName + "，是否解散？";
				}
				GameData.checkType = 1;
				GameUI.closeMainSceneBtnPanel();
				GameUI.openCheck(c_msg);
			} else {
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.roomcode = Desk.roomcode;
				Net.Send_self_apply_free_room(data);
			}
			break;
		case 201:
			//同意解散
			//this.StartLoad();
			var data = {};
			data.agentid = GameData.AgentId;
			data.gameid = GameData.GameId;
			data.playerid = C_Player.playerid;
			data.roomcode = Desk.roomcode;
			Net.Send_self_agree_free_room(data);
			break;
		case 202:
			//拒绝解散
			//this.StartLoad();
			var data = {};
			data.agentid = GameData.AgentId;
			data.gameid = GameData.GameId;
			data.playerid = C_Player.playerid;
			data.roomcode = Desk.roomcode;
			Net.Send_self_refuse_free_room(data);
			break;
		case 153:
			//打开聊天按钮
			GameUI.OpenChat();
			break;
		case 186:
			//关闭聊天 
			var obj = gameabc_face.getdiv("div204");
			obj.blur();
			obj = null;
			this.CloseChat();
			break;
		case 205:
			//发送聊天
			var text = get_self(204, 7, 0, 0, 0);
			var text_bool = Func.strisNull(text);
			if (!text_bool) {
				var obj = gameabc_face.getdiv("div204");
				obj.blur();
				obj = null;
				if (!Func.filter(text)) {
					var data = {};
					data.agentid = GameData.AgentId;
					data.gameid = GameData.GameId;
					data.playerid = C_Player.playerid;
					data.roomcode = Desk.roomcode;
					GameData.selectSysNotice == true ? data.type = 1 : data.type = 0;
					data.text = text;
					//if(Game_Config.sysConfig.vipInfinite){
					//	data.brType = 1;
					//}else{
					//	data.brType = 0;	
					//}
					if (GameData.chatInfo) {
						data.info = GameData.chatInfo;
						data.type = 2;
					}
					Net.Send_send_text(data);
				} else {
					this.OpenTips("内容含有敏感词汇请重新输入！", ConstVal.Tips.time);
				}
			}
			break;
		case 188:
			//点击常用语
			//set_self(188,43,2,0,0);
			var obj = gameabc_face.getdiv("div204");
			obj.blur();
			obj = null;
			this.SelectMsg();
			break;
		case 203:
			//点击表情
			var obj = gameabc_face.getdiv("div204");
			obj.blur();
			obj = null;
			this.SelectEmotion();
			break;
		case 698:
			//点击表情
			var obj = gameabc_face.getdiv("div204");
			obj.blur();
			obj = null;
			this.SelectHistory();
			break;
		case 223:
			//投票结果
			this.CloseApplyResult();
			break;
		case 224:
			//退出程序
			Func.exit();
			break;
		case 226:
			//关闭房卡提示
			GameUI.Closeupdataroomcard();
			break;

		case 217:
		case 218:
			//关闭提示
		case 3193:
			GameUI.CloseTips();
			break;
		case 245:
			//确认解散
			switch (GameData.checkType) {
			case 1:
				//解散房间 
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.roomcode = Desk.roomcode;
				Net.Send_self_break_room(data);
				break;
			case 2:
				//退出房间 
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.roomcode = Desk.roomcode;
				Net.Send_self_exit_room(data);
				break;
			case 3:
				//投降 
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.roomcode = Desk.roomcode;
				data.count = GameData.surrendCount;
				Net.Send_beanroom_surrender(data);
				break;
			case 4:
				//删除房间 
				console.log(GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag]);

				break;
			case 5:
				//h5跳转直接进入房间的确定 
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.roomcode = GameData.fromH5GameData.data.roomcode;
				Net.Send_self_join_room(data);
				break;
			case 6://全部添加黑名单 
				var data={};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.type = 6;
				Net.Send_optBanList(data);
				break;
			case 7://设置全部魅力 
				var data={};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.gameid = GameData.GameId;
				data.value = GameData.allCharm;
				Net.Send_setAllCharm(data);
				break;
				//删除白名单玩家 
			case 8:
				this.closeCheck();
				var data={};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.gameid = GameData.GameId;
				data.shortcode = C_Player.shortcode;
				data.mode = 2;
				data.userid = GameData.whiteList.delPid;
				Net.Send_optWhiteList(data);
				break;
			case 9:
				this.closeCheck();
				var data={};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.shortcode = C_Player.shortcode;
				data.gameid = GameData.GameId;
				data.mode = 1;
				data.userid = GameData.whiteList.delPid;
				data.value = GameData.whiteList.inputCharm;
				Net.Send_optWhiteList(data);
				break;
			}

			break;
		case 247:
		case 242:
		case 246:
			this.closeCheck();
			break;
		case 248:
			//协议确认按钮
			GameData.ProtocolIndex = !GameData.ProtocolIndex;
			break;
		case 249:
			//打开协议 
			this.OpenProtocol();
			break;
		case 250:
		case 253:
			this.CloseProtocol();
			break;
		case 332:
			//关闭即时信息 
		case 333:
		case 335:
			GameUI.HideiMessage();
			break;
			//case 339://微信公众
			//case 680:
		case 76:
			GameUI.Open_ewm();
			break;
		case 345:
			//Func.sharephotourl(1,GameData.wechat_ewm);
			Func.sharefinend(1, 3, GameData.wechat_ewm);
			break;
		case 341:
			GameUI.Close_ewm();
			break;
		case GameData.telSpid:
			Func.callphone(GameData.tel);
			break;
		case 366:
			//粘贴 
			GameData.gamepastetext = "mouseup_366";
			var text = Func.gamepastetext();
			if (GameData.userAgent != ConstVal.userAgent.uAgent_3) {
				var reg = /[^0-9]/g;
				if (text) {
					text = text.replace(reg, "");
					//if(reg.test(text)){
					set_self(365, 7, text, 0, 0);
					//}else{
					//GameUI.OpenTips("粘贴内容格式不符！",ConstVal.Tips.time);
					//}
				}
			}
			break;
		
		case 367:
			var text = get_self(365, 7, 0, 0, 0);
			var obj = gameabc_face.getdiv("div365");
			obj.blur();
			obj = null;
			//if(text.length == 6){
			GameUI.CloseBind();
			var data = {};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.invitecode = text;
			Net.Send_binding_invitecode(data);
			//}else{
			//GameUI.OpenTips("邀请码长度为6位！",ConstVal.Tips.time);	
			//}
			break;
		case 235:

			//GameUI.OpenBind();
			var data = {};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.unionid = C_Player.unionid;
			data.openid = C_Player.openid;
			Net.Send_get_player_invitecode(data);
			break;
		case 362:
			GameUI.CloseBind();
			break;
		case 371:
		case 375:
			GameUI.hideCal();
			break;
		case 46:
		case 386:
			//关闭支付金额选择界面 
			GameUI.ClosePay();
			break;
		case 456:
			//关闭支付确认界面 
			GameUI.CloseCheckPay();
			break;
		case 464:
			//确认支付
			GameUI.StartLoad();
			var data = {};
			data.body = GameData.payList[GameData.payData[0]].memo;
			data.price = GameData.payList[GameData.payData[0]].money;
			data.amount = GameData.payList[GameData.payData[0]].amount;
			data.productid = GameData.payList[GameData.payData[0]].productid;
			data.user = Utl.getMyPlayerid();
			data.type = GameData.payList[GameData.payData[0]].payid;
			data.typeplay = GameData.payData[1] + 1;
			Func.getGamepay(JSON.stringify(data));
			break;
		case 465:
			backgameData();

			break;
		case 481:
			GameData.visitorClick++;
			break;
		case 482:
			if (GameData.visitorClick >= 5 && Game_Config.Debugger.visitorLogin) {
				GameData.visitorClick = 0;
				Func.visitorLogin();
			}
			break;
		case 389:
		case 390:
			GameUI.closeBroadcastfromplayer();
			break;
		case 483:
			Logic.openMatchUrl();
			//else{
			//GameUI.OpenTips("暂未开放，敬请期待",ConstVal.Tips.time);
			//}
			break;
		case 484:
			GameUI.CloseInfo_hall();
			GameUI.openAuth();
			break;
		case 485:
			GameUI.closeAuth();
			break;
		case 493:
			var name_text = get_self(489, 7, 0, 0, 0);
			var id_text = get_self(490, 7, 0, 0, 0);
			if (name_text.length > 1) {
				if (GameData.Validator.isValid(id_text)) {
					GameUI.closeAuth();
					GameUI.OpenTips("认证成功！", ConstVal.Tips.time);
				} else {
					GameUI.OpenTips("身份证信息不正确！", ConstVal.Tips.time);
				}
			} else {
				GameUI.OpenTips("姓名不正确！", ConstVal.Tips.time);
			}
			break;
		case 494:
			//点击设置为无限局 
			GameData.infClickCount++;
			if (GameData.infClickCount >= 5) {
				GameData.infMode = 1;
			}
			break;
		case 495:
			//设置为正常			
			GameData.infMode = 0;
			break;
			//case 682:
			//if(GameData.roomList.length>=1){
			//var data={};
			//data.agentid = GameData.AgentId;
			//data.playerid = C_Player.playerid;
			//data.gameid = GameData.GameId;
			//data.roomcode = GameData.roomList[GameData.roomList.length-1];
			//data.joinmode = 1;
			//Net.Send_self_join_room(data);

			//}
			//break;
			//case 178:
			//if(GameData.roomList.length>=2){
			//var data={};
			//data.agentid = GameData.AgentId;
			//data.playerid = C_Player.playerid;
			//data.gameid = GameData.GameId;
			//data.roomcode = GameData.roomList[GameData.roomList.length-2];
			//data.joinmode = 1;
			//Net.Send_self_join_room(data);

			//}
			//break;
			//case 179:
			//if(GameData.roomList.length>=3){
			//var data={};
			//data.agentid = GameData.AgentId;
			//data.playerid = C_Player.playerid;
			//data.gameid = GameData.GameId;
			//data.roomcode = GameData.roomList[GameData.roomList.length-3];
			//data.joinmode = 1;
			//Net.Send_self_join_room(data);

			//}
			//break;
		case 512:
		case 3143:
			Func.gameCopytext(Desk.roomcode);
			GameUI.OpenTips("复制成功！", ConstVal.Tips.time);
			break;
		case 513:
			//GameData.checkType = 3;
			//GameUI.openCheck("将扣除"+Desk.starCount+"个"+GameData.starName+"，确定逃跑？");
			//Utl.openInputPanel("请输入投降扣除数量(底翻)",function(_data){
			//if(_data <= Desk.starCount){
			//GameData.surrendCount = _data;
			//Utl.closeInputPanel();
			//GameData.checkType = 3;
			//GameUI.openCheck("将扣除"+_data+GameData.starName+"，确定逃跑？");
			//}else{
			//GameUI.OpenTips("输入数量大于最大值"+Desk.starCount+"！",ConstVal.Tips.time);
			//}							
			//});
			GameUI.closeMainSceneBtnPanel();
			Utl.openInputPanel("请输入投降扣除数量(底翻)", function(_data) {
				if (_data <= C_Player.bean) {
					GameData.surrendCount = _data;
					Utl.closeInputPanel();
					GameData.checkType = 3;
					GameUI.openCheck("将扣除" + _data + GameData.starName + "，确定逃跑？");
				} else {
					GameUI.OpenTips("输入大于您拥有的" + _data + GameData.starName + "数:" + C_Player.bean + "！", ConstVal.Tips.time);
				}
			});
			break;
		case 514:
			Logic.pasteRoomCode();
			break;
		case 515:
			var data = {};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.gameid = GameData.GameId;
			data.roomcode = Desk.roomcode;
			Net.Send_player_prepare(data);
			break;
		case ConstVal.worldRoom.f_sp_1:
			//点击系统房间 
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.worldRoomSysSlide) {
				if (up_id >= ConstVal.worldRoom.bg_sp_tag_1 && up_id < ConstVal.worldRoom.top_sp_tag_1) {
					//console.log(GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1]);
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.type = GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1].type;
					data.roomtype = GameData.worldRoomSys[up_id - ConstVal.worldRoom.bg_sp_tag_1].roomtype;
					Net.Send_quick_enter_share_room(data);
				}

			}
			break;
		case ConstVal.worldRoom.f_sp_2:
			//点击玩家房间
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.worldRoomPlySlide) {
				if (up_id >= ConstVal.worldRoom.bg_sp_tag_2 && up_id < ConstVal.worldRoom.top_sp_tag_2) {
					console.log(GameData.worldRoomPly[up_id - ConstVal.worldRoom.bg_sp_tag_2]);
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.roomcode = GameData.worldRoomPly[up_id - ConstVal.worldRoom.bg_sp_tag_2].roomcode;
					data.joinmode = 0;
					Net.Send_self_join_room(data);
				}

			}
			break;
		case ConstVal.rankList.f_spid:
			//点击玩家房间
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.rankListSlide) {
				if (up_id >= ConstVal.rankList.bg_tag && up_id < ConstVal.rankList.badge_tag) {
					//console.log(GameData.rankList[up_id - ConstVal.rankList.bg_tag]);
					GameUI.clickRankList(up_id - ConstVal.rankList.bg_tag);
				}

			}
			break;
		case ConstVal.vipRoomList1.f_spid:
			//
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.vipRoomPageOne.slide) {
				if (up_id >= ConstVal.vipRoomList1.bg_tag && up_id < ConstVal.vipRoomList1.title_tag) {
					var indx = up_id - ConstVal.vipRoomList1.bg_tag;
					GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode;
					console.log("进入", indx, GameData.vipRoomCode);
					GameUI.goVipPageTwo();
				}
/*
				if(up_id>=ConstVal.vipRoomList1.title_tag&&up_id<ConstVal.vipRoomList1.code_tag){
					var indx = up_id - ConstVal.vipRoomList1.title_tag;
					GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode;
					console.log("进入",indx,GameData.vipRoomCode);
					GameUI.goVipPageTwo();
				}
				if(up_id>=ConstVal.vipRoomList1.code_tag&&up_id<ConstVal.vipRoomList1.owner_tag){
					var indx = up_id - ConstVal.vipRoomList1.code_tag;
					GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode;
					console.log("进入",indx,GameData.vipRoomCode);
					GameUI.goVipPageTwo();
				}
				if(up_id>=ConstVal.vipRoomList1.owner_tag&&up_id<ConstVal.vipRoomList1.count_tag){
					var indx = up_id - ConstVal.vipRoomList1.owner_tag;
					GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode;
					console.log("进入",indx,GameData.vipRoomCode);
					GameUI.goVipPageTwo();
				}
				if(up_id>=ConstVal.vipRoomList1.count_tag&&up_id<ConstVal.vipRoomList1.del_tag){
					var indx = up_id - ConstVal.vipRoomList1.title_tag;
					GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode;
					console.log("进入",indx,GameData.vipRoomCode);
					GameUI.goVipPageTwo();
				}*/
				if (up_id >= ConstVal.vipRoomList1.del_tag && up_id < ConstVal.vipRoomList1.enter_tag) {
					var indx = up_id - ConstVal.vipRoomList1.del_tag;
					//GameData.vipRoomCode = GameData.vipRoomShortList[indx];
					GameData.vipRoomCode = GameData.vipRoomData[indx].shortCode;
					console.log("删除", indx, GameData.vipRoomCode);
					Logic.delVipRoom(GameData.vipRoomShortList[indx]);
					GameUI.setVipRoomListData(GameData.vipRoomData);
					GameUI.updateVipRoomList();

				}
				if (up_id >= ConstVal.vipRoomList1.enter_tag) {
					var indx = up_id - ConstVal.vipRoomList1.enter_tag;
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.roomcode = GameData.vipRoomData[indx].shortCode;
					data.joinmode = 0;
					Net.Send_self_join_room(data);

				}

			}
			break;
		case ConstVal.vipRoomList2.f_spid:
			//
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.vipRoomPageTwo.slide) {
				if (up_id >= ConstVal.vipRoomList2.bg_tag && up_id < ConstVal.vipRoomList2.code_tag) {
					var indx = up_id - ConstVal.vipRoomList2.bg_tag;
					console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]);
					GameData.vipRoomJump = true;
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx];
					data.joinmode = 0;
					Net.Send_self_join_room(data);
					//GameUI.goVipPageTwo();
				}
				if (up_id >= ConstVal.vipRoomList2.code_tag && up_id < ConstVal.vipRoomList2.count_tag) {
					var indx = up_id - ConstVal.vipRoomList2.code_tag;
					console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]);
					//GameUI.goVipPageTwo();
					GameData.vipRoomJump = true;
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx];
					data.joinmode = 0;
					Net.Send_self_join_room(data);
				}
				if (up_id >= ConstVal.vipRoomList2.count_tag) {
					var indx = up_id - ConstVal.vipRoomList2.count_tag;
					console.log("进入", GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx]);
					GameData.vipRoomJump = true;
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.roomcode = GameData.vipRoomPageTwo.data.roomcodes.roomlist[indx];
					data.joinmode = 0;
					Net.Send_self_join_room(data);
					//GameUI.goVipPageTwo();
				}



			}
			break;
		
		case 519:
			//关闭 
			GameUI.closeWorldRoom();
			break;
		case 520:
			//刷新 
			var data = {};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.gameid = GameData.GameId;
			Net.Send_get_share_room(data);
			break;
		case 521:
			//快速加入 
			var data = {};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.gameid = GameData.GameId;
			data.type = 1;
			data.roomtype = null;
			Net.Send_quick_enter_share_room(data);
			break;
		case 568:
			//获取星星争霸场 
			if (GameData.hallConfig.worldRoomList) {
				var data = {};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.gameid = GameData.GameId;
				Net.Send_get_share_room(data);
			} else {
				GameUI.OpenTips("暂未开放，敬请期待", ConstVal.Tips.time);
			}
			break;
		case 569:
			var data = {};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.gameid = GameData.GameId;
			data.roomcode = Desk.roomcode;
			Net.Send_share_room(data);
			break;
		case 570:
			GameUI.goBoardPageOne();
			break;
		case 571:
			GameUI.goBoardPageTwo();
			break;
		case 572:
			GameUI.goBoardPageThree();
			break;
		case 576:
			var url = "";
			switch (GameData.noticePage) {
			case 0:
				url = GameData.advertInfo_0.url;
				break;
			case 1:
				url = GameData.advertInfo_1.url;
				break;
			case 2:
				url = GameData.advertInfo_2.url;
				break;
			}
			Func.browser(url);
			break;
		case 579:
			//case 577:
			GameUI.closeSeniorOptions();
			break;
		case ConstVal.snrRoomList.f_spid:
			//
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.snrRoomListSlide) {
				//进入 
				if (up_id >= ConstVal.snrRoomList.bg_tag && up_id < ConstVal.snrRoomList.rcode_bg_tag) {
					GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.bg_tag;
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag];
					data.joinmode = 0;
					Net.Send_self_join_room(data);
				}
				if (up_id >= ConstVal.snrRoomList.rcode_tag && up_id < ConstVal.snrRoomList.close_tag) {
					GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.rcode_tag;
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag];
					data.joinmode = 0;
					Net.Send_self_join_room(data);
				}
				if (up_id >= ConstVal.snrRoomList.video_tag) {
					GameData.snrOptionRoomTag = up_id - ConstVal.snrRoomList.video_tag;
					var data = {};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.gameid = GameData.GameId;
					data.roomcode = GameData.snrRoomList.roomlist[GameData.snrOptionRoomTag];
					data.joinmode = 0;
					Net.Send_self_join_room(data);
				}
				//修改
				//if(up_id>=ConstVal.snrRoomList.update_tag&&up_id<ConstVal.snrRoomList.switch_tag){
				//console.log("修改："+JSON.stringify(GameData.snrRoomList.roomlist[up_id - ConstVal.snrRoomList.update_tag]));
				//}
				//开关
				//if(up_id>=ConstVal.snrRoomList.switch_tag&&up_id<ConstVal.snrRoomList.info_tag){
				//console.log("开关："+JSON.stringify(GameData.snrRoomList.roomlist[up_id - ConstVal.snrRoomList.switch_tag]));
				//}

			}
			break;
		case 602:
			if (RoomNum > 0) {

				var data = {};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.gameid = GameData.GameId;
				data.roomcode = RoomNum;
				Net.Send_self_join_room(data);
			}
			break;
		case 626:
			GameData.snrOption.profit = GameUI.Mem.snrOption.number;
			var data = {};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.gameid = GameData.GameId;
			//if(GameData.snrOptionMode == 0){
			data.tea = GameUI.Mem.snrOption.number + GameUI.Mem.snrOption.sysRebate;
			//}else{
			//data.tea = 0;
			//}
			data.infinite = GameUI.Mem.snrOption.infinite;
			if (Game_Config.sysConfig.vipInfinite) {
				data.infinite = 1;
			}
			data.roomtype = GameData.snrOptionRoomtype;
			data.videoConfig = GameUI.Mem.snrOption.videoConfig;
			if (Game_Config.sysConfig.vipInfinite) {
				data.videoConfig = null;
			}
			
			//data.forbidSelect = GameUI.Mem.snrOption.forbidSelect;
			
			data.rebateLimit = GameUI.Mem.snrOption.rebateLimit;
			data.rebateType = GameUI.Mem.snrOption.rebateType;
			Net.Send_advanced_createroom(data);
			break;
		case 604:
		case 3233:
			if (GameData.hallConfig.rankList == 1) {
				GameUI.openRankList();
			} else if (GameData.hallConfig.rankList == 2) {
				var data = {};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				Net.Send_get_treasurelist(data);
			}
			break;
		case 605:
			GameUI.closeRankList();
			break;
		case 652:
			//分享微信好友
			{
				var vText = "";
				if (GameUI.Mem.snrOption.videoConfig) {
					vText = "*【视频房】";
				}
				
				Func.sharefinend(1, 1, Game_Config.Share.appdownload, Game_Config.Share.title + vText + "微房号:" + GameData.snrRoomList.shortcode, Game_Config.Share.description);
				
			}
			break;
		case 653:
			//分享微信朋友圈
			{

				
				var isBean = 0;
				if (Game_Modify.getRoomMode) {
					isBean = Game_Modify.getRoomMode(GameData.snrRoomList.roomtype);
				}
				switch (isBean) {
				case 1:
					if (GameData.snrRoomList.roomlist.length > 0) {
						var data = {};
						data.agentid = GameData.AgentId;
						data.playerid = C_Player.playerid;
						data.gameid = GameData.GameId;
						data.roomlist = GameData.snrRoomList.roomlist;
						data.roomtype = GameData.snrRoomList.roomtype;
						data.shareType = 1;
						Net.Send_share_room(data);
					} else {
						GameUI.OpenTips("没有已创建房间，无法分享！", ConstVal.Tips.time);
					}
					break;
				default:
					GameUI.OpenTips("仅金币房间支持分享到金币场！", ConstVal.Tips.time);
					break;
				}

			}
			break;
		case 654:
			GameUI.closeShareImg();
			break;
		case 655:
			GameUI.HideImg();
			break;
		case 656:
			GameUI.closeMainSceneBtnPanel();
			Func.appDownload(Game_Config.Share.appdownload);
			break;
		case 3004:
		case 659:
			GameUI.closeInputPanel();
			break;
		case 3005:
		case 3011:
			GameUI.hideNeighbor();
			break;
		case 3007:
		case 3008:
		case 3009:
		case 3010:
			GameUI.OpenTips("邀请成功!", ConstVal.Tips.time);
			break;
		case 3012:
		case 3013:
			GameUI.closeTips2();
			break;
		case 3014:
			GameUI.closeMainSceneBtnPanel();
			var data = {};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.gameid = GameData.GameId;
			data.roomcode = Desk.roomcode;
			Net.Send_change_room(data);
			break;
		case 3016:
			//商城 
			Logic.jumpToStore();
			break;
		case 3017:
			//背包 
			Logic.jumpToBag();
			break;
		case 3018:
			//活动 
			Logic.jumpToAct();
			break;
		case 3019:
			//
			GameUI.closeWorldRoom();
			Game_Modify.OpenCreateRoom();
			break;
		case 3034:
		case 3035:
			GameData.wareHouse.safeInputType = spid_up - 3033;
			GameUI.updateWareHouseCheckBox();
			break;
		case 3059:
		case 3060:
			GameUI.switchWareHousePage(spid_up - 3058, true);
			break;
		case 3029:
		case 97:
			GameUI.closeWareHouse();
			break;
		case 3067:
			//初始化密码 
			GameUI.selectWareHouseInputType(1);
			break;
		case 3068:
			//初始化密码二次输入 
			GameUI.selectWareHouseInputType(2);
			break;
		case 3038:
			//存入取出数量 
			GameUI.selectWareHouseInputType(3);
			break;
		case 3039:
			//存入取出密码 
			GameUI.selectWareHouseInputType(4);
			break;
		case 3087:
			//赠送id 
			GameUI.selectWareHouseInputType(5);
			break;
		case 3088:
			//赠送数量 
			GameUI.selectWareHouseInputType(6);
			break;
		case 3089:
			//赠送密码 
			GameUI.selectWareHouseInputType(7);
			break;
		case 3057:
			GameUI.openWareHouse(true);
			break;
		case 3075:
		case 3076:
			GameData.wareHouse.pInputType = spid_up - 3074;
			GameUI.updateWareHouseCheckBox();
			break;
		case 3096:
			if(String(GameData.wareHouse.pInputId).length==6){
				var data={};
				set_self(3081,1,170,0,0);
				set_self(3082,7,'',0,0);
				data.agentid = GameData.AgentId;
				data.playerid = GameData.wareHouse.pInputId;
				Net.Send_query_player2(data);
			}else{
				GameUI.OpenTips("玩家ID输入不正确",ConstVal.Tips.time);
			}
				//GameData.wareHouse.pId = 123456;
				//GameData.wareHouse.pImg = C_Player.avatar;
				//GameData.wareHouse.pNickName = "afeafefa";
				//GameUI.updateWareHousePlayerInfo();
			break;
		case 3043:
			console.log(GameData.wareHouse);
			if(GameData.wareHouse.page == 1){
				console.log(GameData.wareHouse.selectType);
				switch (GameData.wareHouse.selectType) {
				case 1:
				case 2:
					//设置初始密码 
					console.log("设置初始密码");
					if (GameData.wareHouse.initPassWord1 == GameData.wareHouse.initPassWord2) {
						if (GameData.wareHouse.initPassWord1 != -1 && String(GameData.wareHouse.initPassWord1).length != 0) {
	
							var data = {};
							data.agentid = GameData.AgentId;
							data.playerid = C_Player.playerid;
							data.unionid = C_Player.unionid;
							data.password = String(GameData.wareHouse.initPassWord1);
							console.log("输入合法");
							console.log(data);
							Net.Send_set_bankpwd(data);
						}
					}
					break;
				case 3:
				case 4:
					//保险箱存取 
					console.log("存取" + GameData.wareHouse.safeInputType);
					console.log("数量" + GameData.wareHouse.safeInputCount);
					console.log("密码" + GameData.wareHouse.safePassWord);
					if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 0) {
						GameUI.OpenTips("输入数量为空!", ConstVal.Tips.time);
						break;
					} else {
						if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) {
							GameUI.OpenTips("密码不能为空!", ConstVal.Tips.time);
						} else {
							var data = {};
							data.agentid = GameData.AgentId;
							data.playerid = C_Player.playerid;
							data.mode = GameData.wareHouse.safeInputType - 1;
							data.password = String(GameData.wareHouse.safePassWord);
	
							data.count = Number(GameData.wareHouse.safeInputCount);
	
							if (GameData.wareHouse.safeInputType == 1) { //存入需要扣除默认赠送的金币
								if (C_Player.bean < 0) {
									data.count = 0;
									GameData.wareHouse.safeInputCount = 0;
									GameUI.updateWareHouseInput();
								} else {
	
									if (C_Player.bean < GameData.initBean) {
										GameUI.OpenTips("您身上必须保留"+GameData.initBean+GameData.starName+"！",ConstVal.Tips.time);
										data.count = 0;
										GameData.wareHouse.safeInputCount = 0;
										GameUI.updateWareHouseInput();
									} else {
										if (C_Player.bean - GameData.wareHouse.safeInputCount <= GameData.initBean) {
											GameUI.OpenTips("您身上必须保留"+GameData.initBean+GameData.starName+"！",ConstVal.Tips.time);
											data.count = C_Player.bean - GameData.initBean;
											GameData.wareHouse.safeInputCount = C_Player.bean - GameData.initBean;
											GameUI.updateWareHouseInput();
										}
									}
								}
	
	
							}
							//console.log(data);
							Net.Send_change_star(data);
						}
	
					}
	
	
	
					break;
				}
			}else{
				
					switch (GameData.wareHouse.selectType) {
						case 1:
						case 2:
							//设置初始密码
							console.log("设置初始密码");
							if (GameData.wareHouse.initPassWord1 == GameData.wareHouse.initPassWord2) {
								if (GameData.wareHouse.initPassWord1 != -1 && String(GameData.wareHouse.initPassWord1).length != 0) {
		
									var data = {};
									data.agentid = GameData.AgentId;
									data.playerid = C_Player.playerid;
									data.unionid = C_Player.unionid;
									data.password = String(GameData.wareHouse.initPassWord1);
									console.log("输入合法");
									console.log(data);
									Net.Send_set_bankpwd(data);
								}
							}
							break;
						default:
							if(String(GameData.wareHouse.pInputId).length != 6){
								GameUI.OpenTips("玩家ID为6位！",ConstVal.Tips.time);
							}else{
								var data={};
								data.agentid = GameData.AgentId;
								data.count = GameData.wareHouse.pInputCount;
								data.playerid = C_Player.playerid;
								data.password = GameData.wareHouse.pInputPassWord;
								data.toPlayerid = GameData.wareHouse.pInputId;
								data.gameid = GameData.GameId;
								Net.Send_giveCoin(data);
							}
							break;
					}
				}
					
			
			break;
		case 3097:
			Utl.openInputPanel("输入范围为 " + GameUI.Mem.snrOption.min + "~" + GameUI.Mem.snrOption.max, snrInputCallback);
			break;
		case 3100:
			GameUI.Mem.snrOption.infinite == 1 ? GameUI.Mem.snrOption.infinite = 0 : GameUI.Mem.snrOption.infinite = 1;
			break;
		case 3166:
			GameUI.Mem.snrOption.rebateType = 1;
			break;
		case 3167:
			GameUI.Mem.snrOption.rebateType = 0;
			break;
		case 3102:
		case 3105:
		case 3106:
			if (!GameData.imgAdIsSlide) {
				//console.log(GameData.menuNotice["advert"+GameData.noticePage])
				//switch(GameData.noticePage){
				//case 0:
				//console.log(GameData.menuNotice.advert0);	
				//break;
				//case 1:
				//console.log(GameData.menuNotice.advert1);
				//break;
				//case 2:
				//console.log(GameData.menuNotice.advert2);
				//break;
				//}	
				if (GameData.menuNotice["advert" + GameData.noticePage].imgAdUrl) {
					Func.browser(GameData.menuNotice["advert" + GameData.noticePage].imgAdUrl);
					//Func.OpenurlTitleData(GameData.menuNotice["advert"+GameData.noticePage].imgAdUrl,"","");
				}

			}
			break;
		case 3103:
			if (GameData.firstConnect_Succ && GameData.getJSONState && GameData.LoadCount == 100) {
				if (GameData.adTimer) {
					window.clearInterval(GameData.adTimer);
					GameData.adTimer = null;
				}
				set_self(1, 57, 0, 0, 0);
				GameUI.JumpWxAuth();

			}
			break;
		case 3107:
			GameUI.SelectSysNotice();
			break;
		case 3111:
			if (!Game_Config.sysConfig.vipInfinite) {
				GameData.selectSysNotice = !GameData.selectSysNotice;
			} else {
				GameData.selectSysNotice = true;
			}
			if (!GameData.selectSysNotice) {
				Func.setInput(204, Game_Config.Chat.LimitLength);
			} else {
				Func.setInput(204, ConstVal.sysNotice.limit);
			}

			break;
		case 3120:
			//更多 
			GameUI.openPallet();
			break;
		case 3122:
			GameUI.closePallet();
			break;
		case 92:
			GameUI.goWorldRoom1();
			break;
		case 93:
			GameUI.goWorldRoom2();
			break;
		case 99:
			GameUI.showMyRoomList();
			break;
		case 103:
			GameUI.hideMyRoomList();
			break;
		case 98:
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (up_id >= ConstVal.myRoomList.bgTag && up_id < ConstVal.myRoomList.roomCodeTag) {
				console.log(GameData.roomList[up_id - ConstVal.myRoomList.bgTag]);
				var data = {};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.gameid = GameData.GameId;
				data.roomcode = GameData.roomList[up_id - ConstVal.myRoomList.bgTag];
				data.joinmode = 1;
				Net.Send_self_join_room(data);
			}
			break;
		case 106:
			Func.accreditlogin(1);
			break;
		case 107:
			if (get_self(108, 37, 0, 0, 0)) {
				GameUI.closeMainSceneBtnPanel();
			} else {
				GameUI.openMainSceneBtnPanel();
			}

			break;
		case 3123:
			GameUI.closeMainSceneBtnPanel();
			break;
		case 284:
			if (get_self(109, 37, 0, 0, 0)) {
				GameUI.closeRoomInfo();
			} else {
				GameUI.openRoomInfo();
			}
			break;
		case 109:
		case 3124:
			GameUI.closeRoomInfo();
			break;
		case 3141:
			if (get_self(109, 37, 0, 0, 0)) {
				GameUI.closeRoomInfo();
			} else {
				GameUI.openRoomInfo();
			}
			break;
		case 187:
			GameData.clickChat++;
			if (GameData.clickChat % 3 == 0 && GameData.isService) {
				GameData.clickChat = 0;
				GameData.communionHistory = [];
				GameUI.clearCommunion();
				GameUI.CloseChat();
				GameUI.OpenChat();


			}
			break;
		case 3126:
			GameUI.stopRecord();
			break;
		case 3133:
			GameUI.clickSnrVideo(3133);
			break;
		case 3164:
			GameUI.clickSnrRoomState();
			break;
		case 3139:
			//官方试玩
			if (GameData.sysConfig.ofcShortCode) {
				var data = {};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.gameid = GameData.GameId;
				data.roomcode = GameData.sysConfig.ofcShortCode;
				Net.Send_self_join_room(data);
			} else {
				GameUI.OpenTips("暂未开放,敬请期待", ConstVal.Tips.time);
			}
			break;
		case 3140:
		case 3235:
			//改成游戏内管理好友
			if (GameData.sysConfig.whiteListManager == 1) {
				var data = {};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.gameid = GameData.GameId;
				Net.Send_getPlayerWhiteList(data);
			}else{
				if (GameData.sysConfig.managerUrl) {
					Func.OpenurlTitleData(GameData.sysConfig.managerUrl+"?agentid="+GameData.AgentId+"&channelid="
					+GameData.ChannelId+"&__HTML_VERSION__=3",
					"管理后台","");
					Func.browser(GameData.sysConfig.managerUrl + "?agentid=" + GameData.AgentId + "&channelid=" + GameData.ChannelId + "&playerid=" + C_Player.playerid + "&openid=" + C_Player.openid + "&unionid=" + C_Player.unionid);
				}
			}
			
			break;
		case 3149:
			if (get_self(3148, 37)) {
				GameUI.hideOwnerNotice();
			} else {
				//if(Logic.getVisibleNote()){
				GameUI.showOwnerNotice(Desk.ownerNotice);
				//}

			}

			break;
		case 3155:
			var text = get_self(3154, 7);

			if (GameData.textCallback) {
				GameData.textCallback(text);
				GameData.textCallback = null;
			}
			GameUI.closeTextInput();
			break;
		case 3159:

			GameUI.closeTextInput();
			break;
		case 3156:
			GameUI.openTextInput(C_Player.sign, setSignCallBack, 20);
			break;
		case 3150:
		case 3148:
			GameUI.hideOwnerNotice();
			break;
		case 3158:
			GameUI.closeSeniorOptions();
			break;
		case 679:
			GameUI.openVipRoomList(true);
			break;
		case 3182:
			GameUI.closeVipRoomList();
			break;
		case 3175:
			GameUI.goVipPageOne();
			break;
		case 3196:
		case 3197:
			Utl.openInputPanel("请输入您要设置的值",playeridInputCallBack);
			break;
		case 3194:
			var txt = get_self(3197,7,0,0,0);
			if(txt.length == 6){
				var data={};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.optId = txt;
				data.type = 3;
				Net.Send_optBanList(data);
			}else{
				GameUI.OpenTips("请输入正确的玩家ID！",ConstVal.Tips.time);
			}
			break;
		case 3195:
			var txt = get_self(3197,7,0,0,0);
			if(txt.length == 6){
				var data={};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.optId = txt;
				data.type = 4;
				Net.Send_optBanList(data);
			}else{
				GameUI.OpenTips("请输入正确的玩家ID！",ConstVal.Tips.time);
			}
			break;
		case 3214:
			//GameUI.openBlackList();
			var data={};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.type = 1;
			Net.Send_optBanList(data); 
			break;
		case 3205:
			Utl.openInputPanel("请输入玩家ID(长度六位)",blackInputCallBack);
			break;
		case 3203:
		case 3200:
			GameUI.closeBlackList();
			break;
		case 3206://添加 
			var txt = get_self(3212,7,0,0,0);
			if(txt.length == 6){
				var data={};
				data.agentid = GameData.AgentId;
				data.gameid = GameData.GameId;
				data.playerid = C_Player.playerid;
				data.optId = txt;
				if(GameData.blackList.breakRoom){
					data.breakRoom = 1;
				}else{
					data.breakRoom = 0;
				}
				data.type = 3;
				Net.Send_optBanList(data);
			}else{
				GameUI.OpenTips("请输入正确的玩家ID！",ConstVal.Tips.time);
			}
			break;
		case 3216://删除 
			var txt = get_self(3212,7,0,0,0);
			if(txt.length == 6){
				var data={};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.optId = txt;
				data.type = 4;
				Net.Send_optBanList(data);
			}else{
				GameUI.OpenTips("请输入正确的玩家ID！",ConstVal.Tips.time);
			}
			break;
		case ConstVal.blackList.f_spid:
			//
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.blackList.slide) {
				if (up_id >= ConstVal.blackList.del_tag) {
					GameData.blackList.selectTag = up_id - ConstVal.blackList.del_tag;
					//console.log(GameData.blackList.data[GameData.blackList.selectTag]);
					var data={};
					data.agentid = GameData.AgentId;
					data.playerid = C_Player.playerid;
					data.optId = GameData.blackList.data[GameData.blackList.selectTag];
					data.type = 4;
					Net.Send_optBanList(data);
				}
			}
			break;
		case ConstVal.whiteList.f_spid:
			//
			var up_id = ifast_check_add(spid_up, upx, upy);
			if (!GameData.whiteList.slide) {
				if (up_id >= ConstVal.whiteList.del_tag) {
					GameData.whiteList.selectTag = up_id - ConstVal.whiteList.del_tag;
					//console.log(GameData.whiteList.data[GameData.whiteList.selectTag]);
					var pinfo = GameData.whiteList.data[GameData.whiteList.selectTag];
					GameData.whiteList.delPid = pinfo[0];
					GameData.checkType = 8;
					GameUI.openCheck("是否删除"+pinfo[0]+",当前魅力值:"+pinfo[2]);
				}
				if (up_id >= ConstVal.whiteList.bg_tag && up_id < ConstVal.whiteList.id_tag) {
					GameData.whiteList.selectTag = up_id - ConstVal.whiteList.bg_tag;
					//console.log(GameData.whiteList.data[GameData.whiteList.selectTag]);
					GameUI.searchWhiteList(GameData.whiteList.data[GameData.whiteList.selectTag][0]);
				}
			}
			break;
		case 3281:
			if(GameData.whiteList.inputId){
				GameData.checkType = 8;
				GameData.whiteList.delPid = GameData.whiteList.inputId;
				GameUI.openCheck("是否删除"+GameData.whiteList.inputId+",当前魅力值:"+GameData.whiteList.inputCharm);
			}else{
				GameUI.OpenTips("请输入正确的玩家ID！",ConstVal.Tips.time);
			}
			break;
		case 3276:
			if(GameData.whiteList.inputId){
				GameData.checkType = 9;
				GameData.whiteList.delPid = GameData.whiteList.inputId;
				GameUI.openCheck("是否添加/修改"+GameData.whiteList.inputId+",魅力值:"+GameData.whiteList.inputCharm);
			}else{
				GameUI.OpenTips("请输入正确的玩家ID！",ConstVal.Tips.time);
			}
			break;
		case 3270:
		case 3274:
			GameUI.closeWhiteList();
			break;
		case 3287:
			Utl.openInputPanel("请输入玩家ID(长度六位)",whiteInputCallBack3);
			break;
		case 3275:
			Utl.openInputPanel("请输入玩家ID(长度六位)",whiteInputCallBack1);
			break;
		case 3282:
			Utl.openInputPanel("请输入魅力值",whiteInputCallBack2);
			break;
		case 3289:
			GameUI.searchWhiteList(GameData.whiteList.searchId);
			break;
		case 3217:
			//粘贴
			GameData.gamepastetext = "mouseup_3217";
			var text = Func.gamepastetext();
			if (GameData.userAgent != ConstVal.userAgent.uAgent_3) {
				var reg = /[^0-9]/g;
				if (text) {
					text = text.replace(reg, "");
					GameData.inputPanelData = text;
					GameUI.setNumberImage(3003, GameData.inputPanelData, 51);
					GameUI.adaptPositionSpid(3003, 3002);
				}
			}
			break;
		case 3210:
			GameData.checkType = 6;
			GameUI.openCheck("将所有白名单玩家添加至黑名单？");
			break;
		case 3215:
			GameData.checkType = 7;
			GameUI.openCheck("将所有白名单玩家"+GameData.sysConfig.charmName+"设为"+GameData.allCharm+"？");
			break;
		case 3199:
			//GameUI.openVipRank();
			var data={};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.shortcode = GameData.vipRoomCode;
			Net.Send_getShortCodeRankList(data);
			break;
		case 3222:
		case 3218:
			GameUI.closeVipRank();
			break;
		case 3231:
		case 3232:
			var data={};
			data.agentid = GameData.AgentId;
			data.limit = GameData.sysConfig.vipRankLimit;
			Net.Send_getVipRankList(data);
			break;
		case 3236:
			Utl.openInputPanel("请输入免收值",rebateLimitCallback);
			break;
		case 3240:
			//打开加入房间
			GameUI.closeVipRoomList();
			GameUI.OpenJoinRoom();
			break;
		case 3243:
			//Utl.openTextInput(get_self(3247,7),phoneNumberCallback);
			Utl.openInputPanel("请输入手机号",phoneNumberCallback,true);
			break;
		case 3244:
			//Utl.openTextInput(get_self(3248,7),phoneCodeCallback);
			Utl.openInputPanel("请输入验证码",phoneCodeCallback,true);
			break;
		case 3251:
		case 3241:
			GameUI.closePhoneBind();
			break;
		case 3255:
			Func.deviceLogin();
			break;
		case 3253:
			switch(GameData.phoneType){
				case 1://手机号登录
					if(GameData.phoneNumber && GameData.phoneCode){ 
						// Func.deviceLogin(GameData.phoneNumber,GameData.phoneCode);
						Func.phoneLogin(GameData.phoneNumber,GameData.phoneCode);
						GameUI.closePhoneBind();
					}else{
						GameUI.OpenTips("手机号与验证码均不能为空！");
					}
					break;
				case 2://手机号绑定 
					if(GameData.phoneNumber && GameData.phoneCode){
						var data={};
						data.agentid = GameData.AgentId;
						data.playerid = C_Player.playerid;
						data.phonenum = GameData.phoneNumber;
						data.smmcode = GameData.phoneCode;
						Net.Send_binding_phone(data);
					}else{
						GameUI.OpenTips("手机号与验证码均不能为空！");
					}
					break;
			}
			
			break;
		case 3254:
			GameData.phoneType = 1;
			GameUI.openPhoneBind();
			break;
		case 3256:
			if(C_Player.tel){
				GameUI.OpenTips("您已绑定手机号："+C_Player.tel,ConstVal.Tips.time);	
			}else{
				GameData.phoneType = 2;
				GameUI.openPhoneBind();
			}
			break;
		case 3245:
			if(GameData.phoneCodeTime <= 0 && GameData.phoneNumber){
				GameUI.OpenTips("请通过相关渠道获取");	
				// var data = {};
				// data.agentid = GameData.AgentId;
				// data.phonenum = GameData.phoneNumber;
				// Net.Send_send_phone_code_wechat(data);
				// Logic.savePhoneCode(GameData.phoneNumber,"");
				// GameUI.closePhoneBind();
				// GameUI.openPhoneBind();	
			}
			break;
		case 3258:
			//GameUI.clickSnrFobid();
			var data={};
			data.agentid = GameData.AgentId;
			data.playerid = C_Player.playerid;
			data.gameid = GameData.GameId;
			var fData = 1;
			if(GameData.snrRoomList.forbidSelect){
				fData = 0;
			}
			data.forbidSelect = fData;
			Net.Send_setVipForbidSelect(data);
			break;
		case 3260:
			GameData.blackList.breakRoom = !GameData.blackList.breakRoom;
			break;
		case 3264:
			GameData.feedMode = 2;
			GameUI.OpenFeedback(true);
			break;
		case 3265:
			GameData.gamepastetext = "mouseup_3265";
			var c_text = Func.gamepastetext();
			if(c_text){
				set_self(551,7,c_text,0,0);	
			}
			break;
		case 3266:
			var text = GameUI.getFeedbackText();
			var bTemp = Func.strisNull(text);
			if (!bTemp) {
				GameUI.CloseFeedback();
				//发送cdkey 
				var data= {};
				data.agentid = GameData.AgentId;
				data.playerid = C_Player.playerid;
				data.cardno = text;
				Net.Send_topup_card(data);
			}
			break;
		case 3268:
			GameData.shareFriendInfo.sharetype = 3;
			GameUI.closeSharePannel();
			Func.sharefriend(GameData.shareFriendInfo);
			break;
		case 3269:
			GameData.shareFriendInfo.sharetype = 0;
			GameUI.closeSharePannel();
			Func.sharefriend(GameData.shareFriendInfo);
			break;
		case 3267:
			GameUI.closeSharePannel();
			break;
		}
		if (spid_up >= 376 && spid_up <= 385) {
			for (var i = 0; i < Desk.PlayerList.length; i++) {
				var ind = Logic.ChangeToStatus(C_Player.seat, i);
				if (ind == spid_up - 376) {
					var pOjb = Desk.PlayerList[i];
					GameUI.OpenInfo(ind, pOjb.nickname, pOjb.playerid, pOjb.ip, pOjb.sex, pOjb.seat, pOjb.bean, pOjb.charm);
					pOjb = null;
				}
			}
		}
		if (spid_up >= 461 && spid_up <= 463) {
			GameUI.switchPayType(spid_up - 461);
		}
		if (spid_up >= 416 && spid_up <= 425) {
			GameData.payData[0] = spid_up - 416;
			GameUI.OpenCheckPay();
		}
		if (spid_up >= 29 && spid_up <= 40) {
			Logic.InputRoomCode(spid_up);
		}
		if (spid_up >= 206 && spid_up <= 212) {
			var obj = gameabc_face.getdiv("div204");
			obj.blur();
			obj = null;
			var data = {};
			data.agentid = GameData.AgentId;
			data.gameid = GameData.GameId;
			data.playerid = C_Player.playerid;
			data.roomcode = Desk.roomcode;
			data.text = Game_Config.Info.TextContent[spid_up - 206];
			if (GameData.chatInfo) {
				data.info = GameData.chatInfo;
				data.type = 2;
			}
			Net.Send_send_text(data);
		}
		if (spid_up >= 256 && spid_up <= 263) {
			var data = {};
			data.agentid = GameData.AgentId;
			data.gameid = GameData.GameId;
			data.playerid = C_Player.playerid;
			data.roomcode = Desk.roomcode;
			data.giftid = spid_up - 255;
			data.receiveseat = GameData.InteractPlayer;
			if (GameData.chatInfo) {
				data.info = GameData.chatInfo;
				data.type = 2;
			}
			Net.Send_send_gift(data);
		}
		if (spid_up >= 391 && spid_up <= 403) {
			GameUI.CalInput(spid_up);
		}
		if (spid_up >= 661 && spid_up <= 671 || spid_up == 3000) {
			GameUI.inputPanel(spid_up);
		}
		if (spid_up >= 3044 && spid_up <= 3055) {
			GameUI.wareHouseInput(spid_up);
		}

	}

};

GameUI.utlmousemove = function(gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1) {
	//点击后移动代码

	switch (spid) {
	case 252:
		//协议内容 
		set_self(spid, 19, offmovey, 1, 0);
		break;
	case 290:
		//帮助内容 
		set_self(spid, 19, offmovey, 1, 0);
		break;
	case ConstVal.Emotion.f_spid:
		//表情 
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.slidEmotion = true;
		}

		break;
	case ConstVal.Com_History.f_spid:
		//表情
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.slideHistory = true;
		}
		break;
	case ConstVal.Task.f_spid:

		if (ifast_abs(offmovex) > 2) {
			set_self(spid, 18, offmovex, 1, 0);
			GameData.slideTask = true;
		}
		break;
	case 404:
		set_self(spid, 19, offmovey, 1, 0);
		set_self(81, 19, offmovey, 1, 0);
		break;
	case 3102:
	case 3105:
	case 3106:
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.imgAdIsSlide = true;
		}
		break;
	case ConstVal.worldRoom.f_sp_1:
		//系统房间 
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.worldRoomSysSlide = true;
		}
		break;
	case ConstVal.worldRoom.f_sp_2:
		//玩家房间 
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.worldRoomPlySlide = true;
		}
		break;
	case ConstVal.snrRoomList.f_spid:
		//玩家房间
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.snrRoomListSlide = true;
		}
		break;
	case 597:
		GameUI.seniorOptionsSlide(gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1);
		break;
	case ConstVal.rankList.f_spid:
		//玩家房间
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.rankListSlide = true;
		}
		break;
	case ConstVal.sysNotice.f_spid:
		//玩家房间
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
		}
		break;
	case ConstVal.vipRoomList1.f_spid:
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.vipRoomPageOne.slide = true;
		}

		break;
	case ConstVal.vipRoomList2.f_spid:
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.vipRoomPageTwo.slide = true;
		}
		break;
	case ConstVal.blackList.f_spid:
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.blackList.slide = true;
		}

		break;
	case ConstVal.vipRank.f_spid:
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.vipRank.slide = true;
		}

		break;
	case ConstVal.whiteList.f_spid:
		if (ifast_abs(offmovey) > 2) {
			set_self(spid, 19, offmovey, 1, 0);
			GameData.whiteList.slide = true;
		}

		break;


	}

};

GameUI.utlgamemydraw = function(gameid, spid, times, timelong, no2, no3, no4, no5, no6, no7) {
	//每个精灵更新绘画代码
	if (spid >= 376 && spid <= 385) {
		if (typeof(GameUI.onstate[spid - 376]) != "undefined") {
			if (GameUI.onstate[spid - 376] == 1) { //离线
				ifast_mydrawbmp(spid, 90, 0, 0, get_self(spid, 20, 0, 0, 0), get_self(spid, 21, 0, 0, 0), 0, 0, 100, 100);
			} else if (GameUI.onstate[spid - 376] == 2) { //通话中
				ifast_mydrawbmp(spid, 91, 0, 0, get_self(spid, 20, 0, 0, 0), get_self(spid, 21, 0, 0, 0), 0, 0, 94, 96);
			}
			if (Desk.needprepare == 1) {
				if (GameUI.isprepare[spid - 376] == 1) { //已准备

				} else if (GameUI.onstate[spid - 376] == 0) { //未准备 
					ifast_mydrawbmp(spid, 209, 0, 0, get_self(spid, 20, 0, 0, 0), get_self(spid, 21, 0, 0, 0), 0, 0, 100, 100);
				}
			}
		}
	}
	switch (spid) {


	case 118:
		//个人信息性别
	case 282:
		{
			if (InfoSex == "2") { //女 
				ifast_mydrawbmp(spid, 47, 80, 80, 44, 44, 44, 0, 44, 44);
			} else { //男 
				ifast_mydrawbmp(spid, 47, 80, 80, 44, 44, 0, 0, 44, 44);
			}
		}
		break;

	case 17:
		//任务按钮
		if (C_Player.taskstate != 0) {
			ifast_mydrawbmp(spid, 88, 50, -23, 63, 63, 0, 0, 63, 63);
		}
		break;

	case 254:
		//进度条 
		ifast_mydrawbmp(spid, 96, 0, 0, GameData.LoadCount * get_self(spid, 20, 0, 0, 0) / 100 + 0.1, get_self(spid, 21, 0, 0, 0), 0, get_self(spid, 21, 0, 0, 0), GameData.LoadCount * 416 / 100 + 0.1, get_self(spid, 21, 0, 0, 0));
		break;
	case 256:
		//互动按钮1 
		ifast_mydrawbmp(spid, 99, 0, 5, 80, 80, 20, 30, 90, 90);
		break;
	case 257:
		//互动按钮2
		ifast_mydrawbmp(spid, 102, 0, 0, 80, 80, 1210, 0, 110, 98);
		break;
	case 258:
		//互动按钮3
		ifast_mydrawbmp(spid, 103, 5, 0, 80, 80, 0, 0, 190, 190);
		break;
	case 259:
		//互动按钮4
		ifast_mydrawbmp(spid, 104, 0, 3, 80, 80, 260, 0, 130, 130);
		break;
	case 339:
		//微信公众号下划线
		if (GameData.wechat_gzh) {
			drawlines(spid, 0, 38, get_self(spid, 20, 0, 0, 0), 38, 2, GameData.gzhcolor1);
		}
		break;
	case 680:
		//微信公众号下划线
		drawlines(spid, 0, 30, get_self(spid, 20, 0, 0, 0), 30, 2, GameData.gzhcolor2);
		break;
	case GameData.telSpid:
		//微信公众号下划线
		//if(GameData.roomList.length==0){
		if (GameData.tel) {
			drawlines(spid, 0, 21, get_self(spid, 20, 0, 0, 0), 21, 2, GameData.telcolor);
		}
		//}else{
		//drawlines(spid,5,30,get_self(spid,20,0,0,0),30,2,GameData.telcolor);	
		//}
		break;
		//case 682:
		//if(GameData.roomList.length>=1){
		//drawlines(spid,0,30,get_self(spid,20,0,0,0),30,2,GameData.telcolor);
		//}
		//break;
		//case 178:
		//if(GameData.roomList.length>=2){
		//drawlines(spid,0,30,get_self(spid,20,0,0,0),30,2,GameData.telcolor);
		//}
		//break;
		//case 179:
		//if(GameData.roomList.length>=3){
		//drawlines(spid,0,30,get_self(spid,20,0,0,0),30,2,GameData.telcolor);
		//}
		//break;	
	case 326:
		if (GameData.disType) {
			drawlines(spid, 630, 700, 635, 700, 5);
		}
		for (var i = 0; i < GameData.serverIndex + 1; i++) {
			drawlines(spid, 1100 + i * 10, 700, 1105 + i * 10, 700, 2);
		}
		break;
	case 3100:
		if (GameUI.Mem.snrOption.infinite == 1) {
			ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40);
		}
		break;
	case 3166:
		if (GameUI.Mem.snrOption.rebateType == 1) {
			ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40);
		}
		break;
	case 3167:
		if (GameUI.Mem.snrOption.rebateType == 0) {
			ifast_mydrawbmp(spid, 390, 0, 0, 40, 40, 0, 0, 40, 40);
		}
		break;
	case 3115:
		ifast_mydrawtext(spid, 1, 6, 3, String(get_rec(1)).gblen() * 12.5, 20);
		ifast_mydrawtext(spid, 2, 6, 26, String(get_rec(2)).gblen() * 12.5, 20);
		break;
	case 3111:
		if (GameData.selectSysNotice) {
			ifast_mydrawbmp(spid, 4, 2, 2, 40, 40, 0, 0, 40, 40);
		}
		break;
	case 568:
		if (!GameData.hallConfig.worldRoomList) {
			//ifast_mydrawbmp(spid,11,0,0,get_self(spid,20,0,0,0),get_self(spid,21,0,0,0),0,0,4,4);
			ifast_mydrawbmp(spid, 352, 80, 0, 230, 230, 0, 0, 230, 230);
		}
		break;
	case 483:
		//if (!GameData.matchhtml) {
			//ifast_mydrawbmp(spid, 352, 80, 0, 230, 230, 0, 0, 230, 230);
		//}
		if (!GameData.vipConfig) {
			ifast_mydrawbmp(spid, 352, 80, 0, 230, 230, 0, 0, 230, 230);
		}
		break;
	case 3139:
		if (!GameData.sysConfig.ofcShortCode) {
			//ifast_mydrawbmp(spid,11,0,0,get_self(spid,20,0,0,0),get_self(spid,21,0,0,0),0,0,4,4);
			ifast_mydrawbmp(spid, 352, 110, 5, 99, 99, 0, 0, 230, 230);
		}
		break;
	case ConstVal.Com_History.f_spid:
		if (GameData.chatLine != null && GameData.isService) {
			drawlines(spid, GameData.chatLine[0], GameData.chatLine[1] + GameData.chatLine[3], GameData.chatLine[0] + GameData.chatLine[2], GameData.chatLine[1] + GameData.chatLine[3], 4, "white");
		}
		break;
	case 3260:
		if(GameData.blackList.breakRoom){ 
			ifast_mydrawbmp(spid, 432, 0, 0, 50, 50, 50, 0, 50, 50);
		}
		break;
	}

};
GameUI.utlgamemydrawbegin = function(gameid, spid, times, timelong, no2, no3, no4, no5, no6, no7) {
	//每个精灵更新前绘画代码
	if (spid == 220) {
		set_clip(0, 0, Game_Config.Notice.x1, Game_Config.Notice.y, Game_Config.Notice.x2 - Game_Config.Notice.x1, Game_Config.Notice.h);
	}
	if (spid == 252) {
		set_clip(0, 0, Game_Config.Protocol.x, Game_Config.Protocol.y, Game_Config.Protocol.w, Game_Config.Protocol.h);
	}
	if (spid == 290) {
		set_clip(0, 0, Game_Config.Help.x, Game_Config.Help.y, Game_Config.Help.w, Game_Config.Help.h);
	}
	//if(spid>=315&&spid<=318){
	//if(TaskInfo[spid-315]){
	//set_clip(spid,0,0,0,get_self(311,20,0,0,0)/Number(TaskInfo[spid-315].total)*Number(TaskInfo[spid-315].finish)+0.1,20);
	//}
	//}
	if (spid == 333) {
		set_clip(0, 0, ConstVal.iMessage.x1, ConstVal.iMessage.y, ConstVal.iMessage.x2 - ConstVal.iMessage.x1, ConstVal.iMessage.h);
	}
	if (spid == 338) {
		set_clip(spid, 0, 0, 0, get_self(337, 20, 0, 0, 0) * GameData.Battery, get_self(337, 21, 0, 0, 0));
	}
	if (spid == ConstVal.Emotion.f_spid) {
		set_clip(0, 0, ConstVal.Emotion.clip_x, ConstVal.Emotion.clip_y, ConstVal.Emotion.clip_w, ConstVal.Emotion.clip_h);
	}
	if (spid == ConstVal.Com_History.f_spid) {
		set_clip(0, 0, ConstVal.Com_History.clip_x, ConstVal.Com_History.clip_y, ConstVal.Com_History.clip_w, ConstVal.Com_History.clip_h);
	}
	if (spid == ConstVal.Task.f_spid) {
		set_clip(0, 0, ConstVal.Task.clip_x, ConstVal.Task.clip_y, ConstVal.Task.clip_w, ConstVal.Task.clip_h);
	}
	if (spid == 390) {
		set_clip(0, 0, ConstVal.Broadcast.clip_x, ConstVal.Broadcast.clip_y, ConstVal.Broadcast.clip_w, ConstVal.Broadcast.clip_h);
	}
	if (spid == 404 || spid == 81) {
		set_clip(0, 0, ConstVal.Notice.clip_x, ConstVal.Notice.clip_y, ConstVal.Notice.clip_w, ConstVal.Notice.clip_h);
	}
	if (spid == 3102 || spid == 3105 || spid == 3106) {
		set_clip(0, 0, ConstVal.Notice.img_clip_x, ConstVal.Notice.img_clip_y, ConstVal.Notice.img_clip_w, ConstVal.Notice.img_clip_h);
	}
	if (spid == ConstVal.worldRoom.f_sp_1) {
		set_clip(0, 0, ConstVal.worldRoom.clip_x_1, ConstVal.worldRoom.clip_y_1, ConstVal.worldRoom.clip_w_1, ConstVal.worldRoom.clip_h_1);
	}
	if (spid == ConstVal.worldRoom.f_sp_2) {
		set_clip(0, 0, ConstVal.worldRoom.clip_x_2, ConstVal.worldRoom.clip_y_2, ConstVal.worldRoom.clip_w_2, ConstVal.worldRoom.clip_h_2);
	}
	if (spid == ConstVal.snrRoomList.f_spid) {
		set_clip(0, 0, ConstVal.snrRoomList.clip_x, ConstVal.snrRoomList.clip_y, ConstVal.snrRoomList.clip_w, ConstVal.snrRoomList.clip_h);
	}
	if (spid == ConstVal.rankList.f_spid) {
		set_clip(0, 0, ConstVal.rankList.clip_x, ConstVal.rankList.clip_y, ConstVal.rankList.clip_w, ConstVal.rankList.clip_h);
	}
	if (spid == ConstVal.sysNotice.f_spid) {
		set_clip(0, 0, ConstVal.sysNotice.clip_x, ConstVal.sysNotice.clip_y, ConstVal.sysNotice.clip_w, ConstVal.sysNotice.clip_h);
	}
	if (spid == ConstVal.vipRoomList1.f_spid) {
		set_clip(0, 0, ConstVal.vipRoomList1.clip_x, ConstVal.vipRoomList1.clip_y, ConstVal.vipRoomList1.clip_w, ConstVal.vipRoomList1.clip_h);
	}
	if (spid == ConstVal.vipRoomList2.f_spid) {
		set_clip(0, 0, ConstVal.vipRoomList2.clip_x, ConstVal.vipRoomList2.clip_y, ConstVal.vipRoomList2.clip_w, ConstVal.vipRoomList2.clip_h);
	}
	if (spid == ConstVal.blackList.f_spid) {
		set_clip(0, 0, ConstVal.blackList.clip_x, ConstVal.blackList.clip_y, ConstVal.blackList.clip_w, ConstVal.blackList.clip_h);
	}
	if (spid == ConstVal.whiteList.f_spid) {
		set_clip(0, 0, ConstVal.whiteList.clip_x, ConstVal.whiteList.clip_y, ConstVal.whiteList.clip_w, ConstVal.whiteList.clip_h);
	}
	if (spid == ConstVal.vipRank.f_spid) {
		set_clip(0, 0, ConstVal.vipRank.clip_x, ConstVal.vipRank.clip_y, ConstVal.vipRank.clip_w, ConstVal.vipRank.clip_h);
	}
};

GameUI.utlontimer = function(gameid, spid, /* 本次间隔多少次了 */ times, /* 本次间隔多久 */ timelong, /* 开启后运行多少次了 */ alltimes) {
	/*请在下面输入您的代码
	 */
	//set_self(1,18,5,1,0);
	switch (spid) {
	case 1:
		if (GameData.LoadCount == 100) {
			//if(ConstVal.netType == 0){	
			if (GameData.firstConnect_Succ && GameData.getJSONState) {
				this.JumpWxAuth();
				set_self(1, 57, 0, 0, 0);
			}
			//}else{
			//if(GameData.getJSONState){
			//this.JumpWxAuth();
			//set_self(1,57,0,0,0);
			//}
			//}
		} else {
			GameData.Timesup = true;
			set_self(1, 57, 0, 0, 0);
		}
		break;
	case 2:
		VoteTime--;
		if (VoteTime >= 0) {

			set_self(222, 20, String(VoteTime).length * 30, 0, 0);
			set_self(222, 7, VoteTime, 0, 0);
		}
		if (VoteTime <= 0) {
			set_self(2, 57, 0, 0, 0);
		}
		break;
	case 3:

		if (get_self(149, 37, 0, 0, 0) == 1) {
			Func.SetDate();
			if (get_self(156, 35, 0, 0, 0) == 255) {
				set_self(156, 35, 100, 0, 0);
			} else {
				set_self(156, 35, 255, 0, 0);
			}
		}
		break;
	case 4:
		if (GameData.vipRoomShortList.length > 0 && get_self(6, 37, 0, 0, 0)) {
			var data = {};
			data.agentid = GameData.AgentId;
			data.gameid = GameData.GameId
			data.shortcodeList = GameData.vipRoomShortList;
			Net.Send_getInfoByShortCode(data);
		}
		break;
	case 5:
		GameData.phoneCodeTime--;
		if(GameData.phoneCodeTime < 0){//倒计时结束 
			set_self(5, 57, 0, 0, 0);
			set_self(3245,43,2,0,0);
			set_self(3246,37,0,0,0);
		}else{
			GameUI.setCodeTime(GameData.phoneCodeTime);
		}
		break;

	}
};


GameUI.invisible = function(bTemp) {
	for (var i = 0; i <= Game_Config.Max.group; i++) {
		if (bTemp) {
			if (i == 89) {
				continue;
			}
			if (i == 32) {
				set_self(221, 37, 0, 0, 0);
				set_self(223, 37, 0, 0, 0);
				continue;
			}
		}
		set_group(i, 37, 0, 0, 0);
	}
}
GameUI.JumpWxAuth = function() { //跳转微信授权
	//preAudio();
	//setTimeout(function(){
	//Func.getphoneInfo();
	//C_Player.Init();
	
	Logic.getPhoneInfo();
	GameData.submitLocation = false;
	GameUI.stopMenuSceneAnimation();
	GameData.playerHeadImgState = false;
	GameData.Scene = 0;
	Utl.stopMusic();
	Func.startlocation(2);
	GameUI.invisible();
	GameUI.showBackBtn();
	GameUI.setLoginButton();
	Func.up_imgurl(5, GameData.AgentLoginImg);
	var vText = "V " + GameData.Version + " ";
	if (GameData.hallConfig.betaText) {
		vText += GameData.hallConfig.betaText;
	}
	set_self(285, 7, vText);

	set_group(2, 37, 1, 0, 0);
	if(GameData.sysConfig.deviceLogin){
		set_self(3,37,0,0,0);
		set_self(3254,37,1,0,0);
		set_self(3255,37,0,0,0);
		set_self(3254,18,490,0,0);
		// set_self(3255,18,660,0,0);
	}else{
		set_self(3,37,1,0,0);
		set_self(3254,37,0,0,0);
		set_self(3255,37,0,0,0);
	}
	var WxInfo = null;
	//if (!Game_Config.Debugger.isDebugger) {
		if (GameData.versionState == 0) {
			if (GameData.h5Version == 1) {
				WxInfo = Logic.getWxInfo();
			} else {
				if(!GameData.sysConfig.deviceLogin){
					WxInfo = Utl.getCookie(Utl.Config.wxinfo);
				}else{
					WxInfo = Utl.getCookie(Utl.Config.devicePlayer);
					if(Utl.ReadData(Utl.Config.dLogin)){
						set_self(3254,37,1,0,0);
						// set_self(3255,18,490,0,0);	
					}
				}
			}
		}
	//} else {
		//if (Game_Config.Debugger.AutoLogin) {
			//if (GameData.h5Version == 1) {
				//WxInfo = Logic.getWxInfo();
			//} else {
				//if(!GameData.sysConfig.deviceLogin){
					//WxInfo = Utl.getCookie(Utl.Config.wxinfo);
				//}else{
					//WxInfo = Utl.ReadData(Utl.Config.devicePlayer);
				//}
			//}
		//}
	//}

	if (WxInfo) {
		WxInfo = JSON.parse(WxInfo);
		Func.up_imgurl(25, WxInfo.headimgurl);
		set_self(324, 7, WxInfo.nickname, 0, 0);
		set_self(324, 18, get_self(325, 18, 0, 0, 0) + get_self(325, 20, 0, 0, 0) / 2 - WxInfo.nickname.gblen() * 10.5, 0, 0);
		set_self(3, 37, 0, 0, 0);
		set_self(177, 37, 0, 0, 0);
		set_self(106, 37, 0, 0, 0);
		set_self(3254,37,0,0,0);
		set_self(3255,37,0,0,0);
		play_ani(1, 325, 43, 1, 4, 0, 1500, 0, 0, 0, 0, 0, 0);
		//C_Player.SetWxInfo(WxInfo.openid,WxInfo.headimgurl,WxInfo.nickname,WxInfo.sex,WxInfo.city,WxInfo.Province,WxInfo.unionid);
		//var data={};
		//data.agentid = GameData.AgentId;
		//data.openid = C_Player.openid;
		//data.nickname = C_Player.nickname;
		//data.avatar = C_Player.avatar;
		//data.sex = C_Player.sex;
		//data.province = C_Player.province;
		//data.city = C_Player.city;
		//data.unionid = C_Player.unionid;
		//data.gameid=GameData.GameId;
		//data.version = GameData.versionCode;
		//data.channelid = GameData.ChannelId;
		//data.marketid = GameData.marketID;
		//Net.Send_login(data);
		//if(GameData.loginTimer==null){
		//GameData.loginTimer = setTimeout(function(){
		C_Player.SetWxInfo(WxInfo.openid, WxInfo.headimgurl, WxInfo.nickname, WxInfo.sex, WxInfo.city, WxInfo.Province, WxInfo.unionid);
		var data = {};
		data.agentid = GameData.AgentId;
		data.openid = C_Player.openid;
		data.nickname = C_Player.nickname;
		data.avatar = C_Player.avatar;
		data.sex = C_Player.sex;
		data.province = C_Player.province;
		data.city = C_Player.city;
		data.unionid = C_Player.unionid;
		data.gameid = GameData.GameId;
		data.version = GameData.versionCode;
		data.channelid = GameData.ChannelId;
		data.marketid = GameData.marketID;
		if(GameData.sysConfig.deviceLogin){
			C_Player.setTel(WxInfo.telphone);
			data.telphone = WxInfo.telphone;
			data.telphoneAuto = true;
		}
		Net.Send_login(data);
		//},2000);
		//}
	} else {

		set_self(158, 37, 0, 0, 0);
		set_self(159, 37, 0, 0, 0);
		set_self(160, 37, 0, 0, 0);
		set_self(323, 37, 0, 0, 0);
		set_self(324, 37, 0, 0, 0);
		set_self(325, 37, 0, 0, 0);
		if (isxiaowxgame()) {
			try {
				WXgameloginbuttonshow(1280, 720, get_self(3, 18, 0, 0, 0), get_self(3, 19, 0, 0, 0), get_self(3, 20, 0, 0, 0), get_self(3, 21, 0, 0, 0), 'assets/bmp/00022.png');
			} catch (e) {

			}
		}
	}

	if (GameData.versionState == 1) { //审核版本 
		set_self(405, 37, 0, 0, 0);
		//set_self(3,18,113,0,0);
		//set_self(3,19,388,0,0);
		set_self(3, 18, Game_Config.loginButton.x2, 0, 0);
		set_self(3, 20, 320, 0, 0);
		set_self(3, 21, 98, 0, 0);
		set_self(177, 18, Game_Config.loginButton.x3, 0, 0);
		//set_self(177,18,488,0,0);
		//set_self(177,19,388,0,0);
	} else { //正式版本 
		set_self(177, 37, 0, 0, 0);
		set_self(3, 18, Game_Config.loginButton.x1, 0, 0);
		//set_self(3,19,382,0,0);
		//set_self(3,20,400,0,0);
		//set_self(3,21,116,0,0);

	}
	if (GameData.hallConfig.qqLogin) {
		set_self(106, 37, 1, 0, 0);
	} else {
		set_self(106, 37, 0, 0, 0);
	}
	
	//},2000);
	GameUI.updateInsertHTML();

}
GameUI.updateNoticeBoard = function() {

	if (Game_Config.sysConfig.hideNotice) {
		set_self(16, 37, 0, 0, 0);
		set_self(180, 37, 0, 0, 0);
		set_self(193, 37, 0, 0, 0);
		set_self(194, 37, 0, 0, 0);
		set_self(682, 37, 0, 0, 0);
		set_self(178, 37, 0, 0, 0);
		set_self(179, 37, 0, 0, 0);
		set_self(145, 37, 0, 0, 0);
		return;
	}
	if (GameData.qq || GameData.tel || GameData.wechat_kfh) {
		set_self(16, 37, 0, 0, 0);
	}
	if (GameData.Scene != 1) {
		return;
	}
	var space = 0;
	set_self(340, 41, 0, 0, 0);
	//set_self(340,7,GameData.wechat_gzh,0,0);
	//set_self(339,20,GameData.wechat_gzh.gblen()*13,0,0);
	//set_self(340,18,get_self(16,18,0,0,0)+get_self(16,20,0,0,0)/2-GameData.wechat_gzh.gblen()*6.5,0,0);
	//set_self(339,18,get_self(16,18,0,0,0)+get_self(16,20,0,0,0)/2-GameData.wechat_gzh.gblen()*6.5,0,0);
	set_self(145, 7, Game_Config.Setting.Ads1, 0, 0);
	set_self(180, 37, 0, 0, 0);
	set_self(193, 37, 0, 0, 0);
	set_self(194, 37, 0, 0, 0);
	set_self(682, 37, 0, 0, 0);
	set_self(178, 37, 0, 0, 0);
	set_self(179, 37, 0, 0, 0);
	//var _roomlist = Logic.readRoomList();
	//if(_roomlist.length<=0){
	set_self(681, 7, Game_Config.Setting.info[0], 0, 0);

	//set_self(180,18,78,0,0,0);
	set_self(180, 18, get_self(16, 18, 0, 0, 0) + space, 0, 0, 0);
	var infoList = [];
	var spidTemp = [
		[682, 180],
		[178, 193],
		[179, 194]
	];
	var spidIndex = 0;
	for (var i = 0; i < spidTemp.length; i++) {
		set_self(spidTemp[i][0], 7, "", 0, 0);
		set_self(spidTemp[i][1], 7, "", 0, 0);
		//set_self(spidTemp[i][0],18,136,0,0);
		set_self(spidTemp[i][0], 18, get_self(16, 18, 0, 0, 0) + 101, 0, 0);
		//set_self(spidTemp[i][1],37,0,0,0);
	}
	
	if (GameData.wechat_kfh) {
		set_self(spidTemp[spidIndex][1], 7, "客服微信:", 0, 0);
		set_self(spidTemp[spidIndex][0], 7, GameData.wechat_kfh, 0, 0);
		//set_self(spidTemp[spidIndex][1],18,78,0,0);
		set_self(spidTemp[spidIndex][1], 18, get_self(16, 18, 0, 0, 0) + space, 0, 0);
		set_self(spidTemp[spidIndex][1], 37, 1, 0, 0);
		set_self(spidTemp[spidIndex][0], 37, 1, 0, 0);


		spidIndex++;
	} else {

	}
	if (GameData.qq) {
		set_self(spidTemp[spidIndex][1], 7, "投诉建议:", 0, 0);
		set_self(spidTemp[spidIndex][0], 7, GameData.qq, 0, 0);

		//set_self(spidTemp[spidIndex][1],18,81,0,0);
		set_self(spidTemp[spidIndex][1], 18, get_self(16, 18, 0, 0, 0) + space, 0, 0);
		set_self(spidTemp[spidIndex][1], 37, 1, 0, 0);
		set_self(spidTemp[spidIndex][0], 37, 1, 0, 0);

		spidIndex++;
	} else {

	}
	if (GameData.tel) {
		GameData.telSpid = spidTemp[spidIndex][0];
		set_self(spidTemp[spidIndex][1], 7, "客服手机:", 0, 0);
		set_self(spidTemp[spidIndex][0], 7, GameData.tel, 0, 0);
		//set_self(spidTemp[spidIndex][0],18,136,0,0);

		//set_self(spidTemp[spidIndex][1],18,78,0,0);
		set_self(spidTemp[spidIndex][1], 18, get_self(16, 18, 0, 0, 0) + space, 0, 0);
		set_self(spidTemp[spidIndex][1], 37, 1, 0, 0);
		set_self(spidTemp[spidIndex][0], 37, 1, 0, 0);

		set_self(GameData.telSpid, 20, String(GameData.tel).gblen() * 11.5, 0, 0);
		set_self(GameData.telSpid, 7, GameData.tel, 0, 0);
		spidIndex++;
	} else {

	}
	
/*
			}else{//有历史房间号 
			GameData.telSpid = -1;
			set_self(681,7,"        开房列表");
			var _roomdesspList = [180,193,194];
			var _roomcodespList = [682,178,179];
			for(var i=0;i<GameData.roomList.length;i++){
			if(i==3){break;}
			var _id = i+1;
			set_self(_roomdesspList[i],7,"房间"+_id+":",0,0);
			//set_self(_roomdesspList[i],18,78,0,0);
			set_self(_roomdesspList[i],18,get_self(16,18,0,0,0)+43,0,0);
			set_self(_roomcodespList[i],7,GameData.roomList[GameData.roomList.length-1-i],0,0);
			set_self(_roomcodespList[i],20,String(GameData.roomList[i]).gblen()*14,0,0);
			//set_self(_roomcodespList[i],18,160,0,0);
			set_self(_roomcodespList[i],18,get_self(16,18,0,0,0)+125,0,0);
			set_self(_roomdesspList[i],37,1,0,0);
			set_self(_roomcodespList[i],37,1,0,0);
		}

	}
	*/

}
GameUI.setHallRoomCard = function() {
	//set_self(157,7,C_Player.roomcard,0,0);155 119
	var txt = Utl.convertNumberToImg(C_Player.roomcard);
	GameUI.setNumberImage(3161, txt, 17);
	if (get_self(3161, 20, 0, 0, 0) > 119) {
		set_self(287, 20, get_self(3161, 20, 0, 0, 0) + 53, 0, 0);
		set_self(3161, 18, get_self(287, 18, 0, 0, 0) + 33, 0, 0);
	} else {
		set_self(287, 20, 155, 0, 0);
		GameUI.adaptPositionX(3161, get_self(287, 18, 0, 0, 0) + 85);
	}
	//GameUI.adaptPositionX(3161,get_self());
	//set_self(157,18,get_self(287,18,0,0,0)+get_self(287,20,0,0,0)/2-String(C_Player.roomcard).length*7,0,0);
}
GameUI.setHallStar = function() {
	//set_self(497,7,C_Player.bean,0,0);
	var txt = Utl.convertNumberToImg(C_Player.bean);
	GameUI.setNumberImage(3162, txt, 17);
	if (get_self(3162, 20, 0, 0, 0) > 119) {
		set_self(496, 20, get_self(3162, 20, 0, 0, 0) + 55, 0, 0);
		set_self(3162, 18, get_self(496, 18, 0, 0, 0) + 35, 0, 0);
	} else {
		set_self(496, 20, 155, 0, 0);
		GameUI.adaptPositionX(3162, get_self(496, 18, 0, 0, 0) + 85);
	}
	//set_self(497,18,get_self(496,18,0,0,0)+get_self(496,20,0,0,0)/2-String(C_Player.bean).length*7,0,0);
}
GameUI.setStarPlatformButton = function() {
	set_self(568, 1, ConstVal.starConfig.resList[Number(GameData.nameImgFrame_2) - 1], 0, 0);
}
GameUI.startMenuSceneAnimation = function() {
	var aniTime = 1200;
	set_self(11, 43, 1, 0, 0, 0);
	set_self(12, 43, 1, 0, 0, 0);
	set_self(214, 43, 1, 0, 0, 0);
	set_self(3106, 43, 1, 0, 0, 0);
	set_self(479, 43, 1, 0, 0, 0);
	set_self(568, 43, 1, 0, 0, 0);
	set_self(483, 43, 1, 0, 0, 0);
	play_ani(1, 3016, 43, 1, 40, 0, ConstVal.Animation.time2, 0, 0, 0, 0, 0, 0, 0); //商城
	play_ani(1, 479, 43, 1, 2, 0, 500, 500, 0, 0, 0, 0, 0, 1); //公告喇叭 
	if (GameData.mainMenuAniTimer) {
		window.clearInterval(GameData.mainMenuAniTimer);
		GameData.mainMenuAniTimer = null;
	}
	GameData.mainMenuAniTimer = setInterval(function() {
		var ram = ifast_random(4);
		switch (ram) {
		case 0:
			play_ani(1, 11, 43, 1, 30, 0, ConstVal.Animation.time1, 0, 0, 0, 1, 0, 0, 0); //加入房间
			break;
		case 1:
			play_ani(1, 12, 43, 1, 30, 0, ConstVal.Animation.time1, 0, 0, 0, 1, 0, 0, 0); //加入房间
			break;
		case 2:
			play_ani(1, 568, 43, 1, 30, 0, ConstVal.Animation.time1, 0, 0, 0, 1, 0, 0, 0); //星星场
			break;
		case 3:
			play_ani(1, 483, 43, 1, 30, 0, ConstVal.Animation.time1, 0, 0, 0, 1, 0, 0, 0); //比赛场
			break;
		}
	}, ConstVal.Animation.fundTime);
	//if(id == 11 && sx == 43 && allend == 1){//创建房间
	//play_ani(1,12,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//加入房间
	//}
	//if(id == 12 && sx == 43 && allend == 1){//创建房间
	//play_ani(1,568,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//星星场
	//}
	//if(id == 568 && sx == 43 && allend == 1){//创建房间
	//play_ani(1,483,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//比赛场
	//}
	//if(id == 483 && sx == 43 && allend == 1){//创建房间
	//GameData.mainMenuAniTimer = setTimeout(function(){
	//play_ani(1,11,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//加入房间
	//},ConstVal.Animation.deltaTime);
	//}

	//GameData.mainMenuAniTimer = setTimeout(function(){
	//play_ani(1,11,43,1,30,0,ConstVal.Animation.time1,0,0,0,1,0,0,0);//加入房间

	//},ConstVal.Animation.fundTime+ifast_random(ConstVal.Animation.deltaTime));
}
GameUI.stopMenuSceneAnimation = function() {
	play_ani(0, 11, 43); //创建房间
	play_ani(0, 12, 43); //加入房间
	play_ani(0, 3016, 43); //商城
	play_ani(0, 568, 43); //星星场
	play_ani(0, 479, 43); //公告喇叭
	play_ani(0, 483, 43); //比赛场 
	if (GameData.mainMenuAniTimer) {
		window.clearInterval(GameData.mainMenuAniTimer);
		GameData.mainMenuAniTimer = null;
	}
	set_self(11, 43, 1, 0, 0, 0);
	set_self(12, 43, 1, 0, 0, 0);
	set_self(214, 43, 1, 0, 0, 0);
	set_self(3106, 43, 1, 0, 0, 0);
	set_self(479, 43, 1, 0, 0, 0);
	set_self(568, 43, 1, 0, 0, 0);
	set_self(483, 43, 1, 0, 0, 0);
}
GameUI.openPallet = function() {
	if (GameData.versionState == 1) { //审核版本
		if (GameData.LaunchMode == ConstVal.Launch_mode.from_self) {
			set_self(234, 37, 0, 0, 0);
		}
		set_self(17, 37, 0, 0, 0);
		set_self(16, 37, 0, 0, 0);
		set_self(145, 37, 0, 0, 0);
		set_self(340, 37, 0, 0, 0);
		set_self(339, 37, 0, 0, 0);
		set_self(681, 37, 0, 0, 0);
		set_self(682, 37, 0, 0, 0);
		set_self(178, 37, 0, 0, 0);
		set_self(179, 37, 0, 0, 0);
		set_self(180, 37, 0, 0, 0);
		set_self(193, 37, 0, 0, 0);
		set_self(194, 37, 0, 0, 0);
		set_self(235, 37, 0, 0, 0);
		set_self(483, 37, 0, 0, 0);
		set_self(568, 37, 0, 0, 0);
		set_self(604, 37, 0, 0, 0);
		//if(GameData.hallConfig.enablePay == 0){
		set_self(286, 37, 0, 0, 0);
		set_self(157, 37, 0, 0, 0);
		set_self(287, 37, 0, 0, 0);
		set_self(10, 37, 0, 0, 0);
		set_self(508, 37, 0, 0, 0);
		set_self(497, 37, 0, 0, 0);
		set_self(496, 37, 0, 0, 0);
		set_self(509, 37, 0, 0, 0);
		//}
		if (GameData.isShowNeighbor) {
			GameUI.showNeighbor();
		}
		//set_self(3016,37,0,0,0);
		set_self(3017, 37, 0, 0, 0);
	} else {
		set_group(95, 37, 1, 0, 0);
		if (GameData.agentmode == 1) {
			set_self(235, 37, 0, 0, 0);
		}
		//if(!GameData.matchhtml){//比赛场
		//set_self(483,37,0,0,0);
		//}else{
		//set_self(483,37,0,0,0);
		//}
		//if(GameData.hallConfig.worldRoomList){//显示星星争霸场
		//set_self(568,37,1,0,0);
		//}else{
		//set_self(568,37,0,0,0);
		//}
		if (GameData.hallConfig.rankList) { //显示排行榜
			set_self(604, 37, 1, 0, 0);
		} else {
			set_self(604, 37, 0, 0, 0);
		}
		if (GameData.hallConfig.wareHouse) { //保险箱
			set_self(3057, 37, 1, 0, 0);
		} else {
			set_self(3057, 37, 0, 0, 0);
		}
		if (GameData.agentmode == 1) {
			set_self(235, 37, 0, 0, 0);
		} else {
			set_self(235, 37, 1, 0, 0);
		}
		GameUI.showBagBtn();
		if (GameData.sysConfig.miniPro) {
			set_self(235, 37, 0, 0, 0);
			set_self(15, 37, 0, 0, 0);
		}

	//}
	//set_self(15,37,1,0,0);
	var spList = [15, 604, 235, 3017, 3057, 5];
	var posList = [
		[216, 540],
		[371, 540],
		[526, 540],
		[681, 540],
		[836, 540],
		[991, 540]
	];
	var posIndex = 0;
	//set_self(3121,20,170,0,0);
	for (var i = 0; i < spList.length; i++) {
		if (get_self(spList[i], 37, 0, 0, 0) == 1) {
			set_self(spList[i], 18, posList[posIndex][0], 0, 0);
			set_self(spList[i], 19, posList[posIndex][1], 0, 0);

			posIndex++;
		}
	}
	set_self(3121, 20, 150 * posIndex + 30, 0, 0);
	}
}
GameUI.hidePalletButton = function() {
	if (ConstVal.isGameHall) {
		return;
	}
	var spList = [15, 604, 235, 3017, 3057, 3121];
	for (var i = 0; i < spList.length; i++) {
		set_self(spList[i], 37, 0, 0, 0);
	}
}
GameUI.closePallet = function() {
	if (ConstVal.isGameHall) {
		return;
	}
	set_group(95, 37, 0, 0, 0);
}
GameUI.showMyRoomList = function() {
	GameUI.createMyRoomList();
}
GameUI.hideMyRoomList = function() {
	set_group(98, 37, 0, 0, 0);
}
GameUI.createMyRoomList = function() {
	set_group(98, 37, 1, 0, 0);
	GameUI.clearMyRoomList();
	var _roomlist = Logic.readRoomList();
	var cLength = _roomlist.length;
	if (cLength > ConstVal.myRoomList.maxLength) {
		cLength = ConstVal.myRoomList.maxLength;
	}
	//_roomlist.reverse();
	GameData.createMyRoomListLength = cLength;
	for (var i = 0; i < cLength; i++) {
		var spaceY = i * (get_self(ConstVal.myRoomList.bgSp, 21, 0, 0, 0) + ConstVal.myRoomList.space);
		var bg = ifast_addtospritefromspritecopy(ConstVal.myRoomList.fSpid, ConstVal.myRoomList.bgSp, ConstVal.myRoomList.bgX, ConstVal.myRoomList.bgY + spaceY, ConstVal.myRoomList.bgTag + i);
		var rCode = ifast_addtospritefromspritecopy(ConstVal.myRoomList.fSpid, ConstVal.myRoomList.roomCodeSp, ConstVal.myRoomList.rCodeX, ConstVal.myRoomList.rCodeY + spaceY, ConstVal.myRoomList.roomCodeTag + i);
		GameUI.setNumberImage(rCode, _roomlist[i], ConstVal.myRoomList.roomCodeWidth);
	}
}
GameUI.clearMyRoomList = function() {
	for (var i = 0; i < GameData.createMyRoomListLength; i++) {
		ifast_dllpritefromspritecopy(ConstVal.myRoomList.fSpid, ConstVal.myRoomList.bgTag + i);
		ifast_dllpritefromspritecopy(ConstVal.myRoomList.fSpid, ConstVal.myRoomList.roomCodeTag + i);
	}
}
GameUI.JumpMenuScene = function(_bTemp) {
	Logic.getHTML();
	if (!_bTemp) {
		GameData.matchInfo = null;
	}
	if (!GameData.isLocation) {
		GameData.isLocation = true;
		GameData.otherLocation = false;
		Func.getlocation();
		GameData.otherLocation = true;
	}
	if (!GameData.submitPhoneInfo) {
		Func.getphoneInfo();
		//Func.getAddressBook();
	}
	if (!GameData.submitAddressBook) {
		//Func.getphoneInfo();
		Func.getAddressBook();
	}
	C_Player.charm = undefined;
	GameUI.setStarPlatformButton();
	//set_self(568,43,GameData.nameImgFrame_2,0,0);
	set_self(286, 43, GameData.nameImgFrame_1, 0, 0);
	set_self(508, 43, GameData.nameImgFrame_2, 0, 0);
	GameUI.clearBroadcast();
	Func.startlocation(2);
	GameData.communionHistory = [];
	GameData.sysNotice = [];
	GameUI.VoteList = [];
	GameUI.ApplyPlayer = -1;
	set_self(ConstVal.sysNotice.f_spid, 19, ConstVal.sysNotice.clip_y, 0, 0);
	for (var i = 0; i < GameUI.onstate.length; i++) {
		GameUI.onstate[i] = 0;
	}
	for (var i = 0; i < GameUI.isprepare.length; i++) {
		GameUI.isprepare[i] = 0;
	}
	GameUI.invisible(true);

	set_self(288, 7, Func.subString(C_Player.nickname, Game_Config.Max.Mainnickname, true), 0, 0);
	set_self(289, 7, "ID:" + C_Player.playerid, 0, 0);
	GameUI.setHallRoomCard();
	GameUI.setHallStar();
	//set_self(497,7,C_Player.bean,0,0);
	//set_self(497,18,get_self(496,18,0,0,0)+get_self(496,20,0,0,0)/2-String(C_Player.bean).length*7,0,0);
	if (!GameData.playerHeadImgState) {
		Func.up_imgurl(25, C_Player.avatar);
	}
	set_group(3, 37, 1, 0, 0);
	GameUI.hidePalletButton();
	set_self(219, 37, 0, 0, 0);
	set_self(45, 37, 0, 0, 0);
	set_self(220, 37, 0, 0, 0);

	if (C_Player.taskstate != 0) {
		GameUI.ShowTaskTip();
	} else {
		GameUI.HideTaskTip();
	}
	GameUI.ShowNotice(GameData.scrollmsg);
	Utl.playMusic();



	if (GameData.versionState == 1) { //审核版本 
		if (GameData.LaunchMode == ConstVal.Launch_mode.from_self) {
			set_self(234, 37, 0, 0, 0);
		}
		set_self(17, 37, 0, 0, 0);
		set_self(14, 37, 0, 0, 0);
		set_self(16, 37, 0, 0, 0);
		set_self(145, 37, 0, 0, 0);
		set_self(340, 37, 0, 0, 0);
		set_self(339, 37, 0, 0, 0);
		set_self(681, 37, 0, 0, 0);
		set_self(682, 37, 0, 0, 0);
		set_self(178, 37, 0, 0, 0);
		set_self(179, 37, 0, 0, 0);
		set_self(180, 37, 0, 0, 0);
		set_self(193, 37, 0, 0, 0);
		set_self(194, 37, 0, 0, 0);
		set_self(235, 37, 0, 0, 0);
		set_self(483, 37, 0, 0, 0);
		set_self(568, 37, 0, 0, 0);
		set_self(604, 37, 0, 0, 0);
		//if(GameData.hallConfig.enablePay == 0){
		set_self(286, 37, 0, 0, 0);
		set_self(157, 37, 0, 0, 0);
		set_self(287, 37, 0, 0, 0);
		set_self(10, 37, 0, 0, 0);
		set_self(508, 37, 0, 0, 0);
		set_self(497, 37, 0, 0, 0);
		set_self(496, 37, 0, 0, 0);
		set_self(509, 37, 0, 0, 0);
		
		set_self(3233, 37, 0, 0, 0);
		set_self(3232, 37, 0, 0, 0);
		set_self(76, 37, 0, 0, 0);
		set_self(3139, 37, 0, 0, 0);
		set_self(679, 37, 0, 0, 0);
		set_self(99, 37, 0, 0, 0);
		set_self(3120, 37, 0, 0, 0);
		set_self(3161, 37, 0, 0, 0);
		set_self(3162, 37, 0, 0, 0);
		//}
		if (GameData.isShowNeighbor) {
			GameUI.showNeighbor();
		}
		set_self(3016, 37, 0, 0, 0);
		set_self(3018, 37, 0, 0, 0);
		set_self(3017, 37, 0, 0, 0);
	} else {
		//if(!Game_Config.Debugger.visiblePay){
		//set_self(10,37,0,0,0);
		//}
		//if(GameData.hallConfig.worldRoomList){//显示星星争霸场调整按钮位置 
		//set_self(568,37,1,0,0);
		//}else{
		//set_self(568,37,0,0,0);
		//}
		if (GameData.agentmode == 1) {
			set_self(10, 37, 0, 0, 0);
			set_self(509, 37, 0, 0, 0);

		}
		set_self(235, 37, 0, 0, 0);
		if (GameData.hallConfig.androidPay == 1) {
			set_self(10, 37, 1, 0, 0);
			set_self(509, 37, 1, 0, 0);
		}
		if (!GameData.matchhtml) { //比赛场 
			//set_self(483,37,0,0,0);
		}
		if (GameData.hallConfig.worldRoomList) { //显示星星争霸场
			//set_self(568,37,1,0,0);
		} else {}
		if (GameData.hallConfig.rankList) { //显示排行榜
			//set_self(604,37,1,0,0);
		} else {
			//set_self(604,37,0,0,0);
		}
		if (GameData.hallConfig.wareHouse) { //保险箱 
			//set_self(3057,37,1,0,0);
		} else {
			//set_self(3057,37,0,0,0);
		}
		//GameUI.showStoreBtn();
		//GameUI.showBagBtn();
		GameUI.updateActBtn();
		GameUI.showStoreBtn();
		//官方试玩
		if (!ConstVal.isGameHall) {
			if (!Game_Config.sysConfig.vipInfinite) {
				if (GameData.sysConfig.ofcShortCode) {
					if (GameData.sysConfig.ofcImg) {
						Func.up_imgurl(396, GameData.sysConfig.ofcImg);
					}
				} else {
					//set_self(3139,37,0,0,0);
				}
			} else {
				set_self(3139, 37, 0, 0, 0);
				set_self(679, 37, 0, 0, 0);
			}
		} else {
			set_self(3139, 37, 0, 0, 0);
			set_self(679, 37, 0, 0, 0);
		}
	//}
	if (GameData.h5Version == 1) {
		GameData.gameData = Logic.setGameData("", "");
		GameData.shareAppMessage = Logic.getShareDataObj(Game_Config.Share.title, Game_Config.Share.description);
		GameData.shareTimeline = Logic.getShareDataObj1(Game_Config.Share.title + Game_Config.Share.description, "");
		shareLink(GameData.shareTimeline, GameData.shareAppMessage);
		//Logic.joinRoomFromH5();
	}
	Logic.joinRoomFromH5();
	GameUI.updateInsertHTML();
	//GameUI.adaptButton1();
	//GameUI.adaptButton2();
	if (Game_Config.sysConfig) {
		if (!Game_Config.sysConfig.mainMenuButton) {
			//GameUI.startMenuSceneAnimation();
		} else {
			set_self(11, 37, 0, 0, 0);
			set_self(12, 37, 0, 0, 0);
			set_self(568, 37, 0, 0, 0);
			set_self(483, 37, 0, 0, 0);
		}
	}
	Utl.openMatchUrl();
	if (GameData.Scene == 2) {
		Game_Modify.onExitMainScene();
	}
	if (Game_Modify.onMainMenuScene) {
		Game_Modify.onMainMenuScene();
	}
	GameData.Scene = 1;
	GameUI.updateNoticeBoard();
	if (GameData.sysConfig.hideTaskBtn) {
		set_self(17, 37, 0, 0, 0);
		//set_self(14,18,400,0,0);
		//set_self(13,18,650,0,0);
		//set_self(5,18,900,0,0);
	}
	if (GameData.sysConfig.miniPro) {
		//set_self(3120,37,0,0,0);
		set_self(14, 37, 0, 0, 0);

	}
	if(GameData.sysConfig.hideWxShare){
		set_self(14,37,0,0,0);
	}
	if (!ConstVal.isGameHall) {
		GameUI.adaptSmartBar();
	}

	GameUI.stopTopInfoAnimation(true);
	if (GameData.vipRoomJump) {
		GameUI.openVipRoomList();
	}
	if (GameData.hallConfig.rankList) { //显示排行榜
		set_self(3233,37,1,0,0);
	} else {
		set_self(3233,37,0,0,0);
	}
	if(GameData.sysConfig.deviceLogin){
		set_self(3256,37,0,0,0);
	}else{
		set_self(3256,37,0,0,0);
	}
	// if(C_Player.tel){
	// 	set_self(3256,43,2,0,0);
	// 	play_ani(0,3256,35,255,100,0,1000,0,0,0,0,0,1);		
	// }else{
	// 	set_self(3256,43,1,0,0);
	// 	play_ani(1,3256,35,255,100,0,1000,0,0,0,0,0,1);
	// }
	if (ConstVal.isGameHall) {
		set_self(14, 37, 0, 0, 0);
		set_self(13, 37, 0, 0, 0);
		set_self(17, 37, 0, 0, 0);
		set_self(3120, 37, 0, 0, 0);
		set_self(99, 37, 0, 0, 0);
		set_self(3016, 37, 0, 0, 0);
		set_self(76, 37, 0, 0, 0);
		set_self(234, 37, 0, 0, 0);
		set_self(3057, 37, 0, 0, 0);
		set_self(145, 37, 0, 0, 0);
		set_self(3139, 37, 0, 0, 0);
		set_self(3232,37,0,0,0);
		set_self(3233,37,0,0,0);
		//set_self(3256,37,0,0,0);
		//if(GameData.hallConfig.rankList){//显示排行榜
		//	set_self(604,37,1,0,0);
		//}else{
		set_self(604, 37, 0, 0, 0);
		//}
		//if(GameData.hallConfig.wareHouse){//保险箱
		//	set_self(3057,37,1,0,0);
		//}else{
		//	set_self(3057,37,0,0,0);
		//}
		if (GameData.agentmode == 1) {
			set_self(235, 37, 0, 0, 0);
		} else {
			set_self(235, 37, 1, 0, 0);
		}
		set_self(15, 37, 1, 0, 0); //吐槽
		set_self(5, 37, 1, 0, 0); //消息 
		//var spList = [235,13,604,3017,483,3018,3057];
		//var posList = [[395,198],[395,325],[395,452],[526,198],[526,325],[526,452],[657,198]];
		//GameUI.adaptBtnList(spList,posList);
		GameUI.adaptSmartBar2();
		set_self(145, 37, 0, 0);
		gameHallImport.jumpMenuScene();
	}
	}
	Logic.sendPhoneInfo();
	if(GameData.sysConfig.hideRoomCard == 2){
		set_self(286,37,0,0,0);
		set_self(10,37,0,0,0);
		set_self(287,37,0,0,0);
		set_self(3161,37,0,0,0);
	}
	if(GameData.sysConfig.cdKey == 2){
		set_self(3264,37,1,0,0);
	}else{
		set_self(3264,37,0,0,0);
	}
}
GameUI.adaptSmartBar2 = function() {
	var spList = [235, 15, 5, 7];
	var beginX = 300;
	var endX = 820;
	var count = 0;
	//var posList = [];
	for (var i = 0; i < spList.length; i++) {
		if (get_self(spList[i], 37, 0, 0, 0) == 1) {
			count++;
		}
	}
	var deltaX = (endX - beginX) / (count - 1);

	var showCount = 0;
	for (var i = 0; i < spList.length; i++) {
		if (get_self(spList[i], 37, 0, 0, 0) == 1) {
			set_self(spList[i], 18, beginX + deltaX * showCount, 0, 0);
			set_self(spList[i], 19, 642, 0, 0);
			showCount++;
		}
	}
}
GameUI.adaptSmartBar = function() {
	var spList = [3120, 14, 17, 13, 7];
	var count = 0;
	//var posList = [];
	for (var i = 0; i < spList.length; i++) {
		if (get_self(spList[i], 37, 0, 0, 0) == 1) {
			count++;
		}
	}
	if (count == 0) {
		return;
	}
	if (count == 1) {
		for (var i = 0; i < spList.length; i++) {
			if (get_self(spList[i], 37, 0, 0, 0) == 1) {
				set_self(spList[i], 18, 558, 0, 0);

			}
		}
		return;
	}
	var posList = [376, 740];
	var c2 = 0;
	if (count == 2) {
		for (var i = 0; i < spList.length; i++) {
			if (get_self(spList[i], 37, 0, 0, 0) == 1) {
				set_self(spList[i], 18, posList[c2], 0, 0);
				c2++;
			}
		}
		return;
	}
	//194 922
	var beginX = 194;
	var endX = 922;
	var deltaX = (endX - beginX) / (count - 1);
	var showCount = 0;
	for (var i = 0; i < spList.length; i++) {
		if (get_self(spList[i], 37, 0, 0, 0) == 1) {
			set_self(spList[i], 18, beginX + deltaX * showCount, 0, 0);
			showCount++;
		}
	}
}
GameUI.adaptButton1 = function() {
	var spList = [235, 13, 604, 3017, 483, 3018, 3057];
	var posList = [
		[395, 198],
		[395, 325],
		[395, 452],
		[526, 198],
		[526, 325],
		[526, 452],
		[657, 198]
	];
	var posIndex = 0;
	for (var i = 0; i < spList.length; i++) {
		if (get_self(spList[i], 37, 0, 0, 0) == 1) {
			set_self(spList[i], 18, posList[posIndex][0], 0, 0);
			set_self(spList[i], 19, posList[posIndex][1], 0, 0);
			posIndex++;
		}
	}
}
GameUI.adaptButton2 = function() {
	if (GameData.hallConfig.storeUrl) {
		set_self(17, 18, 160, 0, 0);
		set_self(14, 18, 379, 0, 0);
		set_self(15, 18, 598, 0, 0);
		set_self(234, 18, 817, 0, 0);
	} else {
		set_self(17, 18, 160, 0, 0);
		set_self(14, 18, 379, 0, 0);
		set_self(15, 18, 598, 0, 0);
		set_self(234, 18, 817, 0, 0);
	}
	var spList = [];
	var posList = [];
	if (get_self(3016, 37, 0, 0, 0) == 1) {
		spList = [17, 14, 15, 234, 3016];
		posList = [
			[160, 613],
			[379, 613],
			[598, 613],
			[817, 613],
			[1019, 604]
		];
	} else {
		spList = [17, 14, 15, 234];
		posList = [
			[184, 613],
			[443, 613],
			[702, 613],
			[961, 613]
		];
	}
	var posIndex = 0;
	for (var i = 0; i < spList.length; i++) {
		if (get_self(spList[i], 37, 0, 0, 0) == 1) {
			set_self(spList[i], 18, posList[posIndex][0], 0, 0);
			set_self(spList[i], 19, posList[posIndex][1], 0, 0);
			posIndex++;
		}
	}
}
GameUI.showStoreBtn = function() {
	//set_self(3016,18,1029,0,0);
	//set_self(3016,19,604,0,0);
	if (GameData.hallConfig.storeUrl) {
		set_self(3016, 37, 1, 0, 0);
	} else {
		set_self(3016, 37, 0, 0, 0);
	}
}
GameUI.showBagBtn = function() {
	if (GameData.hallConfig.bagUrl) {
		set_self(3017, 37, 1, 0, 0);
	} else {
		set_self(3017, 37, 0, 0, 0);
	}
}
GameUI.ShowTaskTip = function() {
	set_self(221, 37, 1, 0, 0);
}
GameUI.HideTaskTip = function() {
	set_self(221, 37, 0, 0, 0);
}
GameUI.OpenJoinRoom = function() {
	Utl.playSound(Game_Config.ClickButton.src_2);


	set_group(5, 37, 1, 0, 0);
	var _roomcode = Logic.readShortCode();
	if (_roomcode) {
		_roomcode = String(_roomcode);
		RoomNum = Number(_roomcode);
		RoomCode = _roomcode;
		for (var i = 0; i < 6; i++) {
			if (i < _roomcode.length) {
				set_self(236 + i, 7, _roomcode[i], 0, 0);
			} else {
				set_self(236 + i, 37, 0, 0, 0);
			}

		}
	} else {
		RoomCode = "";
		RoomNum = -1;
		for (var i = 0; i < 6; i++) {
			set_self(236 + i, 37, 0, 0, 0);
		}
	}


}
GameUI.CloseJoinRoom = function() {
	set_group(5, 37, 0, 0, 0);
}
GameUI.StartLoad = function() {
	if (get_self(326, 37, 0, 0, 0) == 0) {
		set_group(40, 37, 1, 0, 0);
		play_ani(1, 327, 34, 0, 360, 0, 1000, 0, 0, 0, 0, 0, 0, 0);
	}


}
GameUI.EndLoad = function() {
	set_group(40, 37, 0, 0, 0);
	play_ani(0, 327, 34, 0, 360, 0, 1000, 0, 0, 0, 0, 0, 0, 0);
}
GameUI.OpenSetting = function(mode) {
	Utl.playSound(Game_Config.ClickButton.src_2);
	var bgm = Utl.ReadData(Utl.Config.bgm);
	var sound = Utl.ReadData(Utl.Config.sound);
	var shake = Utl.ReadData(Utl.Config.shake);
	var voice = Utl.ReadData(Utl.Config.voice);
	if (bgm == 0) {
		set_self(43, 43, 2, 0, 0);

	} else {
		set_self(43, 43, 1, 0, 0);

	}
	if (sound == 0) {
		set_self(44, 43, 2, 0, 0);

	} else {
		set_self(44, 43, 1, 0, 0);

	}
	if (shake == 0) {
		set_self(357, 43, 2, 0, 0);

	} else {
		set_self(357, 43, 1, 0, 0);

	}
	if (voice == 0) {
		set_self(388, 43, 2, 0, 0);

	} else {
		set_self(388, 43, 1, 0, 0);

	}
	set_self(181, 18, 361, 0, 0);
	set_self(182, 18, 691, 0, 0);
	set_group(6, 37, 1, 0, 0);
	switch (mode) {
	case 0:
		//菜单界面设置 
		set_self(181, 37, 0, 0, 0);
		set_self(182, 37, 0, 0, 0);

		break;
	case 1:
		//主界面设置
		set_self(58, 37, 0, 0, 0);
		GameUI.closeMainSceneBtnPanel();
		switch (C_Player.canexit) {
		case 1:
			set_self(181, 18, 361, 0, 0);
			set_self(182, 18, 691, 0, 0);
			if (C_Player.status == 1 && Desk.stage == 0) {
				set_self(181, 43, 4, 0, 0);
			} else {
				set_self(181, 43, 3, 0, 0);
			}
			if (Desk.infinite == 1 && !Game_Config.sysConfig.vipInfinite) {
				set_self(181, 43, 3, 0, 0);
				set_self(182, 37, 0, 0, 0);
				set_self(181, 18, 520, 0, 0);
			}
			if (GameData.matchId || GameData.sysConfig.hideWxShare) { //比赛房间
				set_self(181, 43, 3, 0, 0);
				GameUI.adaptPositionSpid(181, 41);
				set_self(182, 37, 0, 0, 0);
			}
			break;
		case 0:
			set_self(181, 43, 1, 0, 0);
			set_self(181, 18, 361, 0, 0);
			if (Desk.infinite == 1 && !Game_Config.sysConfig.vipInfinite) {
				set_self(182, 37, 0, 0, 0);
				set_self(181, 18, 520, 0, 0);
			}
			if (GameData.matchId) { //比赛房间
				set_self(181, 37, 0, 0, 0);
				set_self(182, 37, 0, 0, 0);
				//GameUI.adaptPositionSpid(182,41);
			}
			break;
		}

		break;
	}
}
GameUI.CloseSetting = function() {
	set_group(6, 37, 0, 0, 0);
}
GameUI.ClickBgm = function() { //点击音乐按钮 
	var bgm = Utl.ReadData(Utl.Config.bgm);
	if (bgm == 0) {

		Logic.TurnOnBgm();
		set_self(43, 43, 1, 0, 0);

	} else {

		Logic.TurnOffBgm();
		set_self(43, 43, 2, 0, 0);

	}
}
GameUI.ClickSound = function() { //点击音效按钮 
	var sound = Utl.ReadData(Utl.Config.sound);
	if (sound == 0) {
		Logic.TurnOnSound();
		set_self(44, 43, 1, 0, 0);

	} else {
		Logic.TurnOffSound();
		set_self(44, 43, 2, 0, 0);

	}
}
GameUI.ClickShake = function() { //点击摇一摇 
	var shake = Utl.ReadData(Utl.Config.shake);
	if (shake == 0) {
		Logic.TurnOnShake();
		set_self(357, 43, 1, 0, 0);

	} else {
		Logic.TurnOffShake();
		set_self(357, 43, 2, 0, 0);

	}
}
GameUI.ClickVoice = function() { //点击音效按钮
	var voice = Utl.ReadData(Utl.Config.voice);
	if (voice == 0) {
		Logic.TurnOnVoice();
		set_self(388, 43, 1, 0, 0);

	} else {
		Logic.TurnOffVoice();
		set_self(388, 43, 2, 0, 0);

	}
}
GameUI.OpenShare = function() { //打开分享页 
	Utl.playSound(Game_Config.ClickButton.src_2);
	if (GameData.hallConfig.shareBgUrl) {
		Func.up_imgurl(345, GameData.hallConfig.shareBgUrl);
	}

	set_group(11, 37, 1, 0, 0);
	//if(GameData.sysConfig.miniPro){

	//}
}
GameUI.CloseShare = function() { //关闭分享页
	set_group(11, 37, 0, 0, 0);
}
GameUI.SetMessageInfo = function(_msg) { //设置消息内容 
	set_self(81, 7, _msg, 0, 0)
}
GameUI.OpenBoard = function() { //打开通知
	Utl.playSound(Game_Config.ClickButton.src_2);
	set_self(570, 43, 1, 0, 0);
	set_self(571, 43, 2, 0, 0);
	set_self(572, 43, 2, 0, 0);

	set_self(573, 43, 2, 0, 0);
	set_self(574, 43, 3, 0, 0);
	set_self(575, 43, 5, 0, 0);


	set_self(3102, 18, ConstVal.Notice.img_clip_x, 0, 0);
	set_self(3102, 19, ConstVal.Notice.img_clip_y, 0, 0);

	GameData.noticePage = 0;
	if (GameData.advertInfo_0.imgUrl) {
		Func.up_imgurl(338, GameData.advertInfo_0.imgUrl);
	}
	if (GameData.advertInfo_1.imgUrl) {
		Func.up_imgurl(339, GameData.advertInfo_1.imgUrl);
	}
	if (GameData.advertInfo_2.imgUrl) {
		Func.up_imgurl(340, GameData.advertInfo_2.imgUrl);
	}
	if (!GameData.advertInfo_0.type) {
		set_self(81, 7, GameData.advertInfo_0.msg, 0, 0);
		set_self(404, 18, ConstVal.Notice.clip_x, 0, 0);
		set_self(404, 19, ConstVal.Notice.clip_y, 0, 0);
		set_self(81, 18, ConstVal.Notice.clip_x, 0, 0);
		set_self(81, 19, ConstVal.Notice.clip_y, 0, 0);
		set_self(404, 20, GameData.noticePara[GameData.noticePage][1], 0, 0);
		set_self(404, 21, GameData.noticePara[GameData.noticePage][0], 0, 0);

		set_group(12, 37, 1, 0, 0);

		if (GameData.advertInfo_0.url) {
			set_self(576, 37, 1, 0, 0);
		} else {
			set_self(576, 37, 0, 0, 0);
		}
		set_self(3102, 37, 0, 0, 0);
		set_self(3105, 37, 0, 0, 0);
		set_self(3106, 37, 0, 0, 0);
	} else {

		set_group(12, 37, 1, 0, 0);
		set_self(404, 37, 0, 0, 0);
		set_self(81, 37, 0, 0, 0);
		set_self(576, 37, 0, 0, 0);
		set_self(3102, 1, 338, 0, 0);
		set_self(3102, 21, GameData.advertInfo_0.height, 0, 0);
		set_self(3102, 37, 1, 0, 0);
		set_self(3105, 37, 0, 0, 0);
		set_self(3106, 37, 0, 0, 0);
	}
	if (!GameData.advertInfo_1.msg && !GameData.advertInfo_1.imgUrl) {
		//set_self(570,37,0,0,0);
		set_self(571, 37, 0, 0, 0);
		set_self(572, 37, 0, 0, 0);
		//set_self(573,37,0,0,0);
		set_self(574, 37, 0, 0, 0);
		set_self(575, 37, 0, 0, 0);

	}
}
GameUI.goBoardPageOne = function() { //跳转通知页一 
	GameData.noticePage = 0;
	set_self(570, 43, 1, 0, 0);
	set_self(571, 43, 2, 0, 0);
	set_self(572, 43, 2, 0, 0);

	set_self(573, 43, 2, 0, 0);
	set_self(574, 43, 3, 0, 0);
	set_self(575, 43, 5, 0, 0);
	if (!GameData.advertInfo_0.type) {
		set_self(3102, 37, 0, 0, 0);
		set_self(3105, 37, 0, 0, 0);
		set_self(3106, 37, 0, 0, 0);
		set_self(404, 37, 1, 0, 0);
		set_self(81, 37, 1, 0, 0);
		if (GameData.advertInfo_0.url) {
			set_self(576, 37, 1, 0, 0);
		} else {
			set_self(576, 37, 0, 0, 0);
		}

		set_self(81, 7, GameData.advertInfo_0.msg, 0, 0);
		set_self(404, 18, ConstVal.Notice.clip_x, 0, 0);
		set_self(404, 19, ConstVal.Notice.clip_y, 0, 0);
		set_self(81, 18, ConstVal.Notice.clip_x, 0, 0);
		set_self(81, 19, ConstVal.Notice.clip_y, 0, 0);
		set_self(404, 20, GameData.noticePara[GameData.noticePage][1], 0, 0);
		set_self(404, 21, GameData.noticePara[GameData.noticePage][0], 0, 0);
	} else {
		set_self(3105, 37, 0, 0, 0);
		set_self(3106, 37, 0, 0, 0);
		set_self(404, 37, 0, 0, 0);
		set_self(81, 37, 0, 0, 0);
		set_self(3102, 18, ConstVal.Notice.img_clip_x, 0, 0);
		set_self(3102, 19, ConstVal.Notice.img_clip_y, 0, 0);
		//set_self(3102,1,338,0,0);
		set_self(3102, 21, GameData.advertInfo_0.height, 0, 0);
		set_self(3102, 37, 1, 0, 0);
	}

}
GameUI.goBoardPageTwo = function() { //跳转通知页二
	GameData.noticePage = 1;
	set_self(570, 43, 2, 0, 0);
	set_self(571, 43, 1, 0, 0);
	set_self(572, 43, 2, 0, 0);

	set_self(573, 43, 1, 0, 0);
	set_self(574, 43, 4, 0, 0);
	set_self(575, 43, 5, 0, 0);
	if (!GameData.advertInfo_1.type) {
		set_self(3102, 37, 0, 0, 0);
		set_self(3105, 37, 0, 0, 0);
		set_self(3106, 37, 0, 0, 0);
		set_self(404, 37, 1, 0, 0);
		set_self(81, 37, 1, 0, 0);

		set_self(404, 18, ConstVal.Notice.clip_x, 0, 0);
		set_self(404, 19, ConstVal.Notice.clip_y, 0, 0);
		set_self(81, 18, ConstVal.Notice.clip_x, 0, 0);
		set_self(81, 19, ConstVal.Notice.clip_y, 0, 0);
		set_self(81, 7, GameData.advertInfo_1.msg, 0, 0);
		set_self(404, 20, GameData.noticePara[GameData.noticePage][1], 0, 0);
		set_self(404, 21, GameData.noticePara[GameData.noticePage][0], 0, 0);
		if (GameData.advertInfo_1.url) {
			set_self(576, 37, 1, 0, 0);
		} else {
			set_self(576, 37, 0, 0, 0);
		}
	} else {
		set_self(3102, 37, 0, 0, 0);
		set_self(3106, 37, 0, 0, 0);
		set_self(404, 37, 0, 0, 0);
		set_self(81, 37, 0, 0, 0);
		set_self(3105, 18, ConstVal.Notice.img_clip_x, 0, 0);
		set_self(3105, 19, ConstVal.Notice.img_clip_y, 0, 0);
		//set_self(3105,1,339,0,0);
		set_self(3105, 21, GameData.advertInfo_1.height, 0, 0);
		set_self(3105, 37, 1, 0, 0);
	}
}
GameUI.goBoardPageThree = function() { //跳转通知页三
	GameData.noticePage = 2;
	set_self(570, 43, 2, 0, 0);
	set_self(571, 43, 2, 0, 0);
	set_self(572, 43, 1, 0, 0);
	set_self(573, 43, 1, 0, 0);
	set_self(574, 43, 3, 0, 0);
	set_self(575, 43, 6, 0, 0);
	if (!GameData.advertInfo_2.type) {
		set_self(3102, 37, 0, 0, 0);
		set_self(3105, 37, 0, 0, 0);
		set_self(3106, 37, 0, 0, 0);
		set_self(404, 37, 1, 0, 0);
		set_self(81, 37, 1, 0, 0);

		set_self(404, 18, ConstVal.Notice.clip_x, 0, 0);
		set_self(404, 19, ConstVal.Notice.clip_y, 0, 0);
		set_self(81, 18, ConstVal.Notice.clip_x, 0, 0);
		set_self(81, 19, ConstVal.Notice.clip_y, 0, 0);
		set_self(81, 7, GameData.advertInfo_2.msg, 0, 0);
		set_self(404, 20, GameData.noticePara[GameData.noticePage][1], 0, 0);
		set_self(404, 21, GameData.noticePara[GameData.noticePage][0], 0, 0);
		if (GameData.advertInfo_2.url) {
			set_self(576, 37, 1, 0, 0);
		} else {
			set_self(576, 37, 0, 0, 0);
		}
	} else {
		set_self(3102, 37, 0, 0, 0);
		set_self(3105, 37, 0, 0, 0);
		set_self(404, 37, 0, 0, 0);
		set_self(81, 37, 0, 0, 0);
		set_self(3106, 18, ConstVal.Notice.img_clip_x, 0, 0);
		set_self(3106, 19, ConstVal.Notice.img_clip_y, 0, 0);
		//set_self(3106,1,340,0,0);
		set_self(3106, 21, GameData.advertInfo_2.height, 0, 0);
		set_self(3106, 37, 1, 0, 0);
	}
}
GameUI.CloseBoard = function(_msg) { //关闭消息
	set_group(12, 37, 0, 0, 0);
}
GameUI.OpenInfo_hall = function() { //打开个人信息
	Utl.playSound(Game_Config.ClickButton.src_2);
	InfoSex = C_Player.sex;
	set_self(118, 1, 25, 0, 0);
	set_group(18, 37, 1, 0, 0);
	set_self(196, 7, Func.subString(C_Player.nickname, Game_Config.Max.Infonickname, true), 0, 0);
	set_self(197, 7, "ID：" + C_Player.playerid, 0, 0);
	set_self(198, 7, "IP：" + C_Player.ip, 0, 0);
	set_self(3152, 7, "个性签名：", 0, 0);
	set_self(199, 7, "积分：" + C_Player.score, 0, 0);
	set_self(510, 7, GameData.starName + "：" + C_Player.bean, 0, 0);
	if (C_Player.addr) {
		set_self(200, 7, C_Player.addr.province + "-" + C_Player.addr.city, 0, 0);
		//set_self(117,21,260,0,0);
	} else {
		set_self(200, 7, "获取定位失败！", 0, 0);
		//set_self(117,21,240,0,0);
	}
	GameUI.setSign();
	if (!GameData.hallConfig.enablePay) {
		set_self(510, 37, 0, 0, 0);
	}
	if (GameData.versionState == 1) {
		set_self(510, 37, 0, 0, 0);
	}
}
GameUI.setSign = function() {
	//C_Player.sign = "分feeeeeeeeeeeeef  else f qw eg wqegwqg";
	if (!C_Player.sign) {
		set_self(3157, 7, "这个家伙很懒~~", 0, 0);
		return;
	}
	var textW = 13;
	var space = 15;
	var bgW = get_self(3156, 20, 0, 0, 0);
	var count = parseInt((bgW - 2 * space) / textW);
	var str = Func.insertFlag(C_Player.sign, "\n", count);
	set_self(3157, 18, get_self(3156, 18, 0, 0) + space, 0, 0);
	set_self(3157, 7, str, 0, 0);
}
GameUI.CloseInfo_hall = function() { //关闭个人信息
	set_group(18, 37, 0, 0, 0);
}
GameUI.OpenInfo = function(ind, nickname, playerid, ip, sex, seat, bean, cVal) { //打开个人信息 
	Utl.playSound(Game_Config.ClickButton.src_2);
	GameData.infoSeat = seat;
	InfoSex = sex;
	if (ind != -1) {
		set_self(282, 1, 116 + ind, 0, 0);
	} else {
		set_self(282, 1, 25, 0, 0);
	}


	set_self(279, 7, Func.subString(nickname, Game_Config.Max.Infonickname, true), 0, 0);
	set_self(280, 7, "ID：" + playerid, 0, 0);
	set_self(281, 7, "IP：" + ip, 0, 0);
	set_self(511, 7, GameData.starName + "：" + bean, 0, 0);

	set_self(216, 21, 230, 0, 0);
	set_group(77, 37, 1, 0, 0);
	GameUI.setShortRoom(GameData.infoSeat, cVal);
	if (typeof(seat) != "undefined") {
		var status = Logic.ChangeToStatus(C_Player.seat, seat);
		if (status != 0) {
			GameData.InteractPlayer = seat;
			set_self(216, 21, 325, 0, 0);
			set_group(38, 37, 1, 0, 0);
		}
	}
	if (!GameData.hallConfig.enablePay) {
		set_self(511, 37, 0, 0, 0);
	}

}
GameUI.setShortRoom = function(seat, val) {
	if (get_self(216, 37, 0, 0, 0)) {
		if (GameData.infoSeat == seat) { //显示的为当前变化的玩家 
			if (typeof val != "undefined") {
				set_self(3125, 7, GameData.sysConfig.charmName + "：" + val, 0, 0);
			} else {
				set_self(3125, 37, 0, 0, 0);
			}
		}
	} else {

	}
}
GameUI.CloseInfo = function() { //关闭个人信息
	set_group(77, 37, 0, 0, 0);
	set_group(38, 37, 0, 0, 0);
}
GameUI.OpenTask = function() { //打开任务
	GameData.copyTaskTagList = [];
	set_self(ConstVal.Task.bg_spid, 43, GameData.nameImgFrame_1, 0, 0);
	set_group(10, 37, 1, 0, 0);
	set_self(ConstVal.Task.f_spid, 18, ConstVal.Task.clip_x);
	set_self(ConstVal.Task.f_spid, 19, ConstVal.Task.clip_y);
	set_self(ConstVal.Task.f_spid, 21, ConstVal.Task.clip_h);
	var task_des = "";
	var reward_des = "";
	var proc_des = "";

	var bg_copy = "";
	var task_des_copy = "";
	var reward_des_copy = "";
	var proc_copy = "";
	var proc_des_copy = "";

	var Dis = ConstVal.Task.bg_w + ConstVal.Task.bg_dis_x;

	var bg_x = 0;
	var task_des_x = 0;
	var reward_des_x = 0;
	var proc_des_x = 0;

	for (var i = 0; i < TaskInfo.length; i++) {
		var text = TaskInfo[i].title;
		var text_copy = "";
		for (var k = 0; k < text.length; k++) {
			text_copy += text[k];
			if ((k + 1) % 8 == 0 && k != 0) {
				text_copy += "\n";
			}
		}


		//公共需要显示的 
		task_des = text_copy;
		reward_des = "奖励" + GameData.roomCardName + ",数量:" + TaskInfo[i].award;
		bg_x = ConstVal.Task.bg_x + ConstVal.Task.bg_x + i * Dis;
		task_des_x = ConstVal.Task.bg_x + ConstVal.Task.task_des_x + i * Dis;
		reward_des_x = ConstVal.Task.bg_x + ConstVal.Task.bg_w / 2 - reward_des.gblen() * 6.5 + i * Dis;

		bg_copy = ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.bg_spid, bg_x, ConstVal.Task.bg_y + ConstVal.Task.bg_y, ConstVal.Task.bg_tag + i); //背景精灵复制 
		GameData.copyTaskTagList.push(ConstVal.Task.bg_tag + i);

		task_des_copy = ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.task_des_spid, task_des_x, ConstVal.Task.bg_y + ConstVal.Task.task_des_y, ConstVal.Task.task_des_tag + i); //任务详情描述 
		set_self(task_des_copy, 7, task_des, 0, 0);
		GameData.copyTaskTagList.push(ConstVal.Task.task_des_tag + i);

		reward_des_copy = ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.reward_des_spid, reward_des_x, ConstVal.Task.bg_y + ConstVal.Task.reward_des_y, ConstVal.Task.reward_des_tag + i); //任务奖励描述
		set_self(reward_des_copy, 7, reward_des, 0, 0);
		GameData.copyTaskTagList.push(ConstVal.Task.reward_des_tag + i);
		//根据任务状态显示 

		proc_des = TaskInfo[i].finish + "/" + TaskInfo[i].total;
		proc_des_x = ConstVal.Task.bg_x + ConstVal.Task.bg_w / 2 - proc_des.gblen() * 3.25 + i * Dis;
		if (TaskInfo[i].state == 0) { //任务一未完成
			if (i == 0) { //第一个任务需要显示去做任务 
				ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.tofinish_btn_spid, ConstVal.Task.bg_x + ConstVal.Task.bg_w / 2 - get_self(ConstVal.Task.tofinish_btn_spid, 20, 0, 0, 0) / 2, ConstVal.Task.bg_y + ConstVal.Task.tofinish_btn_y, ConstVal.Task.tofinish_btn_tag + i); //去做任务
				GameData.copyTaskTagList.push(ConstVal.Task.tofinish_btn_tag + i);
			}
			ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.proc_bg_spid, ConstVal.Task.bg_x + ConstVal.Task.bg_w / 2 - get_self(ConstVal.Task.proc_bg_spid, 20, 0, 0, 0) / 2 + i * Dis, ConstVal.Task.bg_y + ConstVal.Task.proc_bg_y, ConstVal.Task.proc_bg_tag + i); //任务进度背景 
			GameData.copyTaskTagList.push(ConstVal.Task.proc_bg_tag + i);
			proc_copy = ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.proc_spid, ConstVal.Task.bg_x + ConstVal.Task.bg_w / 2 - get_self(ConstVal.Task.proc_spid, 20, 0, 0, 0) / 2 + i * Dis, ConstVal.Task.bg_y + ConstVal.Task.proc_y, ConstVal.Task.proc_tag + i); //任务进度前景 
			set_self(proc_copy, 20, get_self(ConstVal.Task.proc_spid, 20, 0, 0, 0) * TaskInfo[i].finish / TaskInfo[i].total, 0, 0);
			GameData.copyTaskTagList.push(ConstVal.Task.proc_tag + i);
			proc_des_copy = ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.proc_des_spid, proc_des_x, ConstVal.Task.bg_y + ConstVal.Task.proc_des_y, ConstVal.Task.proc_des_tag + i); //任务进度文字描述 
			set_self(proc_des_copy, 7, proc_des, 0, 0);
			GameData.copyTaskTagList.push(ConstVal.Task.proc_des_tag + i);
		} else { //任务一已完成
			if (TaskInfo[i].state == 1) { //未领取
				ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.get_reward_btn_spid, ConstVal.Task.bg_x + ConstVal.Task.bg_w / 2 - get_self(ConstVal.Task.get_reward_btn_spid, 20, 0, 0, 0) / 2 + i * Dis, ConstVal.Task.bg_y + ConstVal.Task.get_reward_btn_y, ConstVal.Task.get_reward_btn_tag + i); //领取奖励 
				GameData.copyTaskTagList.push(ConstVal.Task.get_reward_btn_tag + i);
			} else {
				ifast_addtospritefromspritecopy(ConstVal.Task.f_spid, ConstVal.Task.isreward_spid, ConstVal.Task.bg_x + ConstVal.Task.bg_w / 2 - get_self(ConstVal.Task.isreward_spid, 20, 0, 0, 0) / 2 + i * Dis, ConstVal.Task.bg_y + ConstVal.Task.isreward_y, ConstVal.Task.isreward_tag + i); //领取奖励
				GameData.copyTaskTagList.push(ConstVal.Task.isreward_tag + i);
			}
		}

	}
	set_self(ConstVal.Task.f_spid, 20, TaskInfo.length * Dis, 0, 0);

}

GameUI.CloseTask = function() { //关闭任务
	for (var tag = 0; tag < GameData.copyTaskTagList.length; tag++) {
		ifast_dllpritefromspritecopy(ConstVal.Task.f_spid, tag);
	}
	set_group(10, 37, 0, 0, 0);
}

GameUI.OpenHelp = function() { //打开帮助 
	Game_Modify.onOpenHelp(290);
	Utl.playSound(Game_Config.ClickButton.src_2);
	GameUI.closeMainSceneBtnPanel();
	set_group(19, 37, 1, 0, 0);
}
GameUI.CloseHelp = function() {
	set_group(19, 37, 0, 0, 0);
}
GameUI.SetTaskInfo = function(_msg) {
	TaskInfo = _msg.data.tasks;
}
GameUI.OpenCharge = function(_msg) { //打开充值提示 
	set_self(148, 7, _msg, 1, 0);
	set_self(680, 7, GameData.wechat_gzh, 0, 0);
	set_self(680, 20, GameData.wechat_gzh.gblen() * 13.5, 0, 0);
	set_group(20, 37, 1, 0, 0);

}
GameUI.CloseCharge = function() { //关闭充值 
	set_group(20, 37, 0, 0, 0);
}
GameUI.MainScene = function(bTemp) { //游戏主界面 
	GameUI.stopMenuSceneAnimation();
	this.HideNotice();

	set_self(195, 43, GameData.nameImgFrame_1, 0, 0);
	//GameUI.Mem.headSize[0] = get_self(376,20,0,0,0);
	//GameUI.Mem.headSize[1] = get_self(376,21,0,0,0);
	if (bTemp) { //显示
		this.invisible();
		//GameData.getnetwork = "MainScene";
		if (Desk.roomcode) {
			set_self(3141, 7, Desk.roomcode, 0, 0);
		}
		GameData.NetWork = Func.getnetwork();
		if (GameData.NetWork == 2) {
			set_self(336, 43, 3, 0, 0);
			Func.getwifisignalLevel();
		} else {
			set_self(336, 43, 4, 0, 0);
		}
		GameData.Battery = Func.getbattery();

		if (GameData.Battery <= 0.2) {
			set_self(338, 43, 3, 0, 0);
		} else {
			set_self(338, 43, 2, 0, 0);
		}

		if (GameData.OS == ConstVal.OS.apple) { //苹果 
			set_self(154, 1, 174, 0, 0);
			set_self(155, 1, 174, 0, 0);
			set_self(156, 1, 173, 0, 0);
		} else if (GameData.OS == ConstVal.OS.android) { //安卓 
			set_self(154, 1, 69, 0, 0);
			set_self(155, 1, 69, 0, 0);
			set_self(156, 1, 70, 0, 0);
		}



		set_group(21, 37, 1, 0, 0);
		set_self(3115, 37, 0, 0, 0);
		set_self(3116, 37, 0, 0, 0);
		GameUI.updateSysNoticeCount2();
		GameUI.updatePlayerInfoUI();
		GameUI.openRoomInfo();
		set_self(3141, 37, 0, 0, 0);
		set_self(3142, 37, 0, 0, 0);
		GameUI.playTopInfoAnimation();
	} else { //隐藏 
		set_group(21, 37, 0, 0, 0);
	}
	Utl.playMusic();
	GameData.Scene = 2;
	Game_Modify.onEnterMainScene(Desk.roomtype);
	GameData.gameData = Logic.setGameData(h5RpcList.joinRoom, {
		roomcode: Desk.roomcode
	});
	if (GameData.h5Version == 1) {
		//GameData.gameData = Logic.setGameData(h5RpcList.joinRoom,{roomcode:Desk.roomcode});
		GameData.shareAppMessage = Logic.getShareDataObj(Game_Config.Share.title + Game_Config.Share.gameTitle + GameData.shareMsg, Game_Config.Share.gameDescription);
		GameData.shareTimeline = Logic.getShareDataObj1(Game_Config.Share.title + Game_Config.Share.description, "");
		shareLink(GameData.shareTimeline, GameData.shareAppMessage);
	}
	GameUI.updateInsertHTML();
	if (GameData.sysConfig.miniPro) {
		set_self(153, 37, 0, 0, 0);
	}

}
GameUI.mainSceneLoaded = function() {
	if (Game_Config.sysConfig) {
		if (Game_Config.sysConfig.mainSceneButton) {
			Utl.closeMainSceneButton();
			var type = 0;
			if (Game_Config.sysConfig.vipInfinite) {
				type = 1;
			}
			Utl.closeCommunication(type);
		}
	}
}
GameUI.updatePlayerInfoUI = function() {
	if (Game_Config.sysConfig) {
		if (Game_Config.sysConfig.mainScenePlayerInfo) {
			return;
		}
	}
	if(typeof Game_Modify.updatePlayerInfoUI !== 'undefined'){
		for(var i = 0; i < Desk.PlayerList.length; i++){
			Game_Modify.updatePlayerInfoUI(i);
		}
	}else{
		for (var i = 0; i < Desk.PlayerList.length; i++) {
			if (Desk.PlayerList[i].playerid != -1) {
				var ind = Logic.ChangeToStatus(C_Player.seat, i);
				var text = Func.subString(Desk.PlayerList[i].nickname, Game_Config.Info.Mainnickname, true);
				set_self(406 + ind, 7, text, 0, 0);
				if (ind == 0) {
					if (Game_Config.Info.myPositionDefault) {
						set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
					} else {
						set_self(406 + ind, 18, Game_Config.Info.myPosition - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
					}
				} else {
					if (Game_Config.Info.otherPositionDefault) {
						set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
					} else {
						set_self(406 + ind, 18, Game_Config.Info.position[ind - 1] - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
					}
				}

				set_self(436 + ind, 7, 0, 0, 0);
				if (ind == 0) {
					if (Game_Config.Info.myPositionDefault) {
						set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
					} else {
						set_self(436 + ind, 18, Game_Config.Info.myPosition - Game_Config.Info.textwidth_2 / 2, 0, 0);
					}
				} else {
					if (Game_Config.Info.otherPositionDefault) {
						set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
					} else {
						set_self(436 + ind, 18, Game_Config.Info.position[ind - 1] - Game_Config.Info.textwidth_2 / 2, 0, 0);
					}
				}
				Func.up_imgurl(116 + ind, Desk.PlayerList[i].avatar);
				set_group(43 + ind, 37, 1, 0, 0);
			} else {
				var ind = Logic.ChangeToStatus(C_Player.seat, i);
				set_group(43 + ind, 37, 0, 0, 0);
			}
		}
	}
}
GameUI.StartVoteCountDown = function(time) {
	VoteTime = time;
	set_self(2, 57, 1000, 0, 0);
	set_self(222, 20, String(VoteTime).length * 30, 0, 0);
	set_self(222, 7, VoteTime, 0, 0);
}
GameUI.PlayerJoinRoom = function(seat) { //玩家加入房间显示 
	if (Game_Config.sysConfig) {
		if (Game_Config.sysConfig.mainScenePlayerInfo) {
			return;
		}
	}
	if(typeof Game_Modify.updatePlayerInfoUI !== 'undefined'){
		for(var i = 0; i < Desk.PlayerList.length; i++){
			Game_Modify.updatePlayerInfoUI(i);
		}
	}else{
		var ind = Logic.ChangeToStatus(C_Player.seat, seat);
		var text = Func.subString(Desk.PlayerList[seat].nickname, Game_Config.Info.Mainnickname, true);
		set_self(406 + ind, 7, text, 1, 0);
		if (ind == 0) {
			if (Game_Config.Info.myPositionDefault) {
				set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
			} else {
				set_self(406 + ind, 18, Game_Config.Info.myPosition - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
			}
		} else {
			if (Game_Config.Info.otherPositionDefault) {
				set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
			} else {
				set_self(406 + ind, 18, Game_Config.Info.position[ind - 1] - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
			}
		}
		set_self(436 + ind, 7, 0, 0, 0);
		if (ind == 0) {
			if (Game_Config.Info.myPositionDefault) {
				set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
			} else {
				set_self(436 + ind, 18, Game_Config.Info.myPosition - Game_Config.Info.textwidth_2 / 2, 0, 0);
			}
		} else {
			if (Game_Config.Info.otherPositionDefault) {
				set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
			} else {
				set_self(436 + ind, 18, Game_Config.Info.position[ind - 1] - Game_Config.Info.textwidth_2 / 2, 0, 0);
			}
		}
		Func.up_imgurl(116 + ind, Desk.PlayerList[seat].avatar);
		set_group(43 + ind, 37, 1, 0, 0);
	}
}
GameUI.PlayerLeaveRoom = function(seat) { //玩家加入房间显示
	var ind = Logic.ChangeToStatus(C_Player.seat, seat);
	set_self(406 + ind, 7, "", 0, 0);
	set_self(436 + ind, 7, "", 0, 0);
	set_group(43 + ind, 37, 0, 0, 0);
}
GameUI.OpenApply = function(bTemp, time) { //打开申请解散投票界面
	this.CloseSetting();
	GameUI.CloseChat();
	set_self(369, 7, "三人及以下全部同意达成解散，\n三人以上超过半数同意达成解散");
	this.VoteList = [];
	
	for (var i = 0; i < Desk.agreefree.length; i++) {
		if (Desk.agreefree[i] != null && Desk.agreefree[i] != 0) {
			this.VoteList.push(i);
		}
		if (Desk.agreefree[i] == 0) {
			this.ApplyPlayer = i;
		}
	}
	for (var i = 0; i < this.VoteList.length; i++) {
		set_self(264 + i, 7, "【" + Desk.GetPlayerBySeat(this.VoteList[i]).nickname + "】", 0, 0);
		set_self(166 + i, 7, "等待", 0, 0);
	}
	for (var i = 0; i < Desk.AgreeList.length; i++) {
		for (var j = 0; j < this.VoteList.length; j++) {
			if (this.VoteList[j] == Desk.AgreeList[i]) {
				//set_self(193+j,7,"同意",0,0);
				set_self(166 + j, 7, "同意", 0, 0);
			}
		}

	}

	set_self(191, 7, "发起投票:【" + Desk.GetPlayerBySeat(this.ApplyPlayer).nickname + "】\n\n请问是否同意？(倒计时结束未选择，则默认同意)", 0, 0);
	set_group(29, 37, 1, 0, 0);
	for (var i = this.VoteList.length; i <10; i++) {
		set_self(264 + i, 37, 0, 0, 0);
		set_self(166 + i, 37, 0, 0, 0);
	}
	if (bTemp) {
		set_self(201, 37, 0, 0, 0);
		set_self(202, 37, 0, 0, 0);
	}
	
	set_self(223, 37, 0, 0, 0);
	this.StartVoteCountDown(time);

}
GameUI.OpenApplyResult = function(bTemp, agreelist) {
	GameUI.CloseChat();
	GameUI.CloseSetting();
	set_self(369, 7, "三人及以下全部同意达成解散，\n三人以上超过半数同意达成解散");
	if (bTemp) { //投票通过
		var vlist = [];
		var vote;
		for (var i = 0; i < agreelist.length; i++) {

			if (agreelist[i] == 1) {
				vlist.push(i);
			}
			if (agreelist[i] == 0) {
				vote = i;
			}
		}
		set_self(191, 7, "投票结果：\n\n投票发起:【" + Desk.GetPlayerBySeat(vote).nickname + "】", 0, 0);
		for (var i = 0; i < vlist.length; i++) {
			set_self(264 + i, 7, "【" + Desk.GetPlayerBySeat(vlist[i]).nickname + "】", 0, 0);
			set_self(166 + i, 7, "同意", 0, 0);
		}
		set_group(29, 37, 1, 0, 0);
		for (var i = vlist.length; i < 10; i++) {
			set_self(264 + i, 37, 0, 0, 0);
			set_self(166 + i, 37, 0, 0, 0);
		}
		set_self(201, 37, 0, 0, 0);
		set_self(202, 37, 0, 0, 0);
		set_self(222, 37, 0, 0, 0);
		set_self(223, 37, 1, 0, 0);
	} else {

		set_self(191, 7, "投票结果：\n\n拒绝解散玩家:【" + Desk.GetPlayerBySeat(agreelist[0]).nickname + "】", 0, 0);
		set_group(29, 37, 1, 0, 0);
		for (var i = agreelist.length - 1; i < 10; i++) {
			set_self(264 + i, 37, 0, 0, 0);
			set_self(166 + i, 37, 0, 0, 0);
		}
		set_self(201, 37, 0, 0, 0);
		set_self(202, 37, 0, 0, 0);
		set_self(222, 37, 0, 0, 0);
		set_self(223, 37, 1, 0, 0);
	}
}
GameUI.CloseApplyResult = function() {

	if (Desk.applyresult == 1) {
		Desk.applyresult = -1;
		if (Desk.deskfree != null) {
			GameUI.CloseApplyResult();
			Game_Modify.Free(Desk.deskfree);
		} else {
			Desk.Init();
			C_Player.BreakRoom();
			GameUI.JumpMenuScene();
		}
	} else {
		set_group(29, 37, 0, 0, 0);
		set_self(223, 37, 0, 0, 0);
		Desk.applyresult = -1;
	}
}
GameUI.SelfVote = function(v) { //自己投票解散 
	set_self(369, 7, "三人及以下全部同意达成解散，\n三人以上超过半数同意达成解散");
	switch (v) {
	case 0:
		//拒绝
		for (var i = 0; i < this.VoteList.length; i++) {
			if (this.VoteList[i] == C_Player.seat) {
				set_self(166 + i, 7, "拒绝", 1, 0);
			}
		}
		set_self(201, 37, 0, 0, 0);
		set_self(202, 37, 0, 0, 0);
		break;
	case 1:
		//同意 
		for (var i = 0; i < this.VoteList.length; i++) {
			if (this.VoteList[i] == C_Player.seat) {
				set_self(166 + i, 7, "同意", 1, 0);
			}
		}
		set_self(201, 37, 0, 0, 0);
		set_self(202, 37, 0, 0, 0);
		break;
	}
}
GameUI.OtherVote = function(v, _msg) { //他人投票解散
	switch (v) {
	case 0:
		//拒绝
		for (var i = 0; i < this.VoteList.length; i++) {
			if (this.VoteList[i] == _msg.data.seat) {
				set_self(166 + i, 7, "拒绝", 1, 0);
			}
		}
		break;
	case 1:
		//同意
		//console.log("他人同意"+Desk.AgreeList);
		for (var i = 0; i < this.VoteList.length; i++) {
			if (this.VoteList[i] == _msg.data.seat) {
				set_self(166 + i, 7, "同意", 1, 0);
			}
		}
		break;
	}
}
GameUI.showEscape = function() {
	if (Game_Config.sysConfig) {
		if (Game_Config.sysConfig.mainSceneButton) {
			set_self(513, 37, 0, 0, 0);
			return;
		}
	}
	if (GameData.sysConfig.hideEscape) {
		set_self(513, 37, 0, 0, 0);
	} else {
		set_self(513, 37, 1, 0, 0);
	}

}
GameUI.hideEscape = function() {
	set_self(513, 37, 0, 0, 0);
}
GameUI.showExitBtn = function() {
	set_self(233, 37, 1, 0, 0);
}
GameUI.hideExitBtn = function() {
	set_self(233, 37, 0, 0, 0);
}
GameUI.showExitBtn2 = function() {
	set_self(3145, 37, 1, 0, 0);
}
GameUI.hideExitBtn2 = function() {
	set_self(3145, 37, 0, 0, 0);
}
GameUI.showBreakBtn2 = function() {
	set_self(3144, 37, 1, 0, 0);
}
GameUI.hideBreakBtn2 = function() {
	set_self(3144, 37, 0, 0, 0);
}
GameUI.showOwnerNotice = function(notice) {
	if (!notice) {
		return;
	}

	notice = "房主公告:\n" + notice;
	var spaceX = 15;
	var spaceY = 15;
	var bgSpace = 0;
	var textW = 14.5;
	var lineH = 28;
	var parm = Logic.countText(notice);
	set_self(3150, 7, notice, 0);
	set_self(3150, 37, 1, 0, 0);

	var w = spaceX * 2 + parm[1] * textW;
	if (parm) {
		set_self(3148, 20, spaceX * 2 + parm[1] * textW, 0, 0);
		set_self(3148, 21, spaceY * 2 + parm[0] * lineH, 0, 0);

		set_self(3148, 18, get_self(3149, 18, 0, 0, 0) - get_self(3148, 20, 0, 0, 0) - bgSpace, 0, 0);

	}

	set_self(3150, 19, get_self(3148, 19, 0, 0, 0) + spaceY, 0, 0);
	set_self(3150, 18, get_self(3148, 18, 0, 0, 0) + spaceY, 0, 0);
	set_self(3148, 37, 1, 0, 0);

}
GameUI.hideOwnerNotice = function() {
	set_self(3148, 37, 0, 0, 0);
	set_self(3150, 37, 0, 0, 0);

}
GameUI.showDesktopUI = function() {
	//if(Desk.stage==1){return;}
	//set_self(3144,37,1,0,0);
	set_self(3145, 37, 1, 0, 0);
	set_self(3143, 37, 1, 0, 0);
	set_self(3146, 37, 1, 0, 0);
	set_self(3147, 37, 1, 0, 0);
	set_self(3151, 37, 1, 0, 0);
	//有短号房主留言 
	if (Desk.ownerNotice) {
		set_self(3149, 37, 1, 0, 0);
		if (Logic.getVisibleNote()) {
			GameUI.showOwnerNotice(Desk.ownerNotice);
		}

	}
	if (Desk.stage == 0) {
		if (GameUI.checkShowRoomCode()) {
			set_self(3146, 7, Desk.roomcode, 0, 0);
			if (C_Player.status == 1) {
				GameUI.showBreakBtn2();
			}

		} else {
			GameUI.hideDesktopUI();
		}
	} else {
		GameUI.hideDesktopUI();
	}
}
GameUI.hideDesktopUI = function() {
	set_self(3144, 37, 0, 0, 0);
	set_self(3145, 37, 0, 0, 0);
	set_self(3143, 37, 0, 0, 0);
	set_self(3146, 37, 0, 0, 0);
	set_self(3147, 37, 0, 0, 0);
	set_self(3151, 37, 0, 0, 0);
}
//判断房号()是否可以显示 
GameUI.checkShowRoomCode = function() {
	if (Desk.infinite == 1) {
		return 0;
	}
	if (GameData.matchInfo) {
		return 0;
	}
	return 1;
}
GameUI.ShowStartScene = function() { //显示开始按钮 
	GameUI.showDesktopUI();
	if (C_Player.status == 1) { //房主 
		set_group(28, 37, 1, 0, 0);
		//set_self(656,37,0,0,0);
		set_self(184, 37, 0, 0, 0);
		if (GameData.matchId) { //比赛房间 
			//set_self(185,37,0,0,0);
			GameUI.hideBreakBtn2();
		}
		//if(Desk.playercnt == 2 && Desk.roomMode == 1 && Desk.infinite == 0 && Desk.stage == 0){
		//GameUI.showEscape();
		//}else{
		//GameUI.hideEscape();
		//}
		if (C_Player.isStart == true) {
			if (Desk.getPrepareCnt() < Desk.warcnt) {
				set_self(184, 37, 0, 0, 0);
			} else {
				set_self(184, 37, 1, 0, 0);
				GameData.shakeID = Game_Config.shakeList.startwar;
				Func.startshake();

			}
		}
		//set_self(233,37,0,0,0);
		if (GameData.versionState == 0) {
			set_self(195, 37, 1, 0, 0);
		} else {
			set_self(195, 37, 0, 0, 0);
		}
		if (Desk.roomMode == 1 && GameData.hallConfig.worldRoomList && GameData.hallConfig.shareButton) { //星星场 
			set_self(569, 37, 1, 0, 0);
			//set_self(183,18,290,0,0);
			//set_self(569,18,700,0,0);
		} else {
			set_self(569, 37, 0, 0, 0);
			//set_self(183,18,466,0,0);
		}
		//GameUI.showChangeRoom();
	} else {
		set_self(183, 37, 1, 0, 0);
		//GameUI.showExitBtn();//set_self(233,37,1,0,0);
		GameUI.showExitBtn2();
		//set_self(512,37,1,0,0);
		//set_self(656,37,0,0,0);
		if (C_Player.isStart == true) {
			if (Desk.playercnt < Desk.warcnt) {
				set_self(184, 37, 0, 0, 0);
			} else {
				set_self(184, 37, 1, 0, 0);
				GameData.shakeID = Game_Config.shakeList.startwar;
				Func.startshake();

			}
		}
	}
	GameUI.hideReady();
	//if(GameData.matchInfo){
	//set_self(512,37,0,0,0);
	//}
	if (GameData.matchId) {
		set_self(512, 37, 0, 0, 0);
		set_self(183, 37, 0, 0, 0);
		set_self(569, 37, 0, 0, 0);
		set_self(195, 37, 0, 0, 0);
	}

	if (GameData.hallConfig.groupMsg) {
		set_self(658, 7, GameData.hallConfig.groupMsg, 0, 0);
		set_self(658, 18, get_self(657, 18, 0, 0, 0) + get_self(657, 20, 0, 0, 0) / 2 - String(GameData.hallConfig.groupMsg).gblen() * 6.5, 0, 0);
	} else {
		set_self(657, 37, 0, 0, 0);
		set_self(658, 37, 0, 0, 0);
	}
	if (Desk.infinite == 1) { //无限局即系统房间 
		//set_self(185,37,0,0,0);
		set_self(195, 37, 0, 0, 0);
		set_self(183, 37, 0, 0, 0);
		set_self(513, 37, 0, 0, 0);
		set_self(512, 37, 0, 0, 0);
		set_self(184, 37, 0, 0, 0);
		//set_self(185,37,0,0,0);
		set_self(569, 37, 0, 0, 0);
	}
	if(GameData.sysConfig.hideWxShare){
		set_self(183,37,0,0,0);
	}

}
GameUI.HideStartScene = function() { //隐藏开始按钮
	set_group(28, 37, 0, 0, 0);
	GameUI.updateMainSceneBtnPanel();
}
GameUI.showStartButton = function() {
	if (Game_Config.sysConfig) {
		if (Game_Config.sysConfig.mainSceneButton) {
			return;
		}
	}
	if (Desk.infinite == 1) { //无限局即系统房间
		set_self(184, 37, 0, 0, 0);
		return;
	}
	if (Desk.getPrepareCnt() >= Desk.warcnt && Desk.stage == 0 && C_Player.isStart == true) {
		set_self(184, 37, 1, 0, 0);
		GameData.shakeID = Game_Config.shakeList.startwar;
		Func.startshake();

	} else {
		set_self(184, 37, 0, 0, 0);
		GameData.shakeID = Game_Config.shakeList.nil;
		Func.stopshake();
	}

}
GameUI.showReady = function() {
	if (typeof Desk.needprepare != "undefined") {
		if (Desk.needprepare == 1) {
			if (C_Player.isprepare == 0) {
				set_self(515, 37, 1, 0, 0);

			} else {
				set_self(515, 37, 0, 0, 0);
				//GameUI.hideChangeRoom();
			}
		} else {
			set_self(515, 37, 0, 0, 0);
			//GameUI.hideChangeRoom();
		}
		if (Desk.infinite == 1) {
			//GameUI.showChangeRoom();
			//GameUI.showExitBtn();
		}
	} else {
		set_self(515, 37, 0, 0, 0);
		//GameUI.hideChangeRoom();
	}

}
GameUI.hideReady = function() {
	set_self(515, 37, 0, 0, 0);
	//GameUI.hideChangeRoom();
}
GameUI.showChangeRoom = function() {
	if (Desk.infinite == 1 && !Desk.shortcode) {
		set_self(3014, 37, 1, 0, 0);
	} else {
		set_self(3014, 37, 0, 0, 0);
	}
	if (Game_Config.sysConfig.vipInfinite) {
		set_self(3014, 37, 0, 0, 0);
	}
}
GameUI.hideChangeRoom = function() {
	set_self(3014, 37, 0, 0, 0);
	GameUI.hideExitBtn(); //set_self(233,37,0,0,0);
	GameUI.showExitBtn2();
}
GameUI.OpenChat = function() { //打开消息聊天 
	//GameData.chatLine = null;
	Utl.playSound(Game_Config.ClickButton.src_2);
	set_group(30, 37, 1, 0, 0);
	if (!Game_Config.sysConfig.vipInfinite) {
		if (GameData.sysNoticeLimit < 0) {
			GameData.selectSysNotice = false;
			if (!GameData.selectSysNotice) {
				Func.setInput(204, Game_Config.Chat.LimitLength);
			} else {
				Func.setInput(204, ConstVal.sysNotice.limit);
			}
			set_self(3111, 37, 0, 0, 0);
			set_self(3113, 37, 0, 0, 0);
			set_self(3117, 37, 0, 0, 0);
		} else {
			if (C_Player.bean >= GameData.sysNoticeLimit) {
				set_self(3111, 37, 1, 0, 0);
				set_self(3113, 37, 1, 0, 0);
				set_self(3117, 37, 1, 0, 0);
				set_self(3117, 7, "发送系统公告将消耗" + GameData.starName + "数量:" + GameData.sysNoticeCost, 0, 0);
			} else {
				GameData.selectSysNotice = false;
				if (!GameData.selectSysNotice) {
					Func.setInput(204, Game_Config.Chat.LimitLength);
				} else {
					Func.setInput(204, ConstVal.sysNotice.limit);
				}
				set_self(3111, 37, 0, 0, 0);
				set_self(3113, 37, 0, 0, 0);
				set_self(3117, 37, 0, 0, 0);
			}
		}
		switch (GameData.ChatPage) {
		case 1:
			GameUI.SelectMsg();
			break;
		case 2:
			GameUI.SelectEmotion();
			break;
		case 3:
			GameUI.SelectHistory();
			break;
		case 4:
			GameUI.SelectSysNotice();
			break;
		default:

			break;
		}
	} else {
		GameData.selectSysNotice = true;
		set_self(188, 37, 0, 0, 0);
		set_self(699, 37, 0, 0, 0);
		set_self(203, 37, 0, 0, 0);
		set_self(161, 37, 0, 0, 0);
		set_self(698, 37, 0, 0, 0);
		set_self(162, 37, 0, 0, 0);
		if (GameData.sysNoticeLimit < 0) {
			GameData.selectSysNotice = false;
			if (!GameData.selectSysNotice) {
				Func.setInput(204, Game_Config.Chat.LimitLength);
			} else {
				Func.setInput(204, ConstVal.sysNotice.limit);
			}
			set_self(3111, 37, 0, 0, 0);
			set_self(3113, 37, 0, 0, 0);
			set_self(3117, 37, 0, 0, 0);
		} else {
			if (C_Player.bean >= GameData.sysNoticeLimit) {
				set_self(3111, 37, 1, 0, 0);
				set_self(3113, 37, 1, 0, 0);
				set_self(3117, 37, 1, 0, 0);
				set_self(3117, 7, "发送系统公告将消耗" + GameData.starName + "数量:" + GameData.sysNoticeCost, 0, 0);
			} else {
				GameData.selectSysNotice = false;
				if (!GameData.selectSysNotice) {
					Func.setInput(204, Game_Config.Chat.LimitLength);
				} else {
					Func.setInput(204, ConstVal.sysNotice.limit);
				}
				set_self(3111, 37, 0, 0, 0);
				set_self(3113, 37, 0, 0, 0);
				set_self(3117, 37, 0, 0, 0);
			}
		}

		set_self(3107, 19, 151, 0, 0);
		set_self(3108, 19, 169, 0, 0);

		set_self(3112, 19, 141, 0, 0);
		set_self(3114, 19, 143, 0, 0);
		GameUI.SelectSysNotice();

	}
	GameUI.updateSysNoticeCount();
}
GameUI.CloseChat = function() { //关闭聊天 
	GameUI.clearCommunion();
	set_group(30, 37, 0, 0, 0);
}
GameUI.SelectMsg = function() { //选择常用语 
	GameData.ChatPage = 1;
	GameUI.clearCommunion();
	set_self(ConstVal.Emotion.f_spid, 37, 0, 0, 0);
	set_self(ConstVal.Com_History.f_spid, 37, 0, 0, 0);
	set_self(ConstVal.sysNotice.f_spid, 37, 0, 0, 0);
	set_self(188, 43, 2, 0, 0);
	set_self(203, 43, 1, 0, 0);
	set_self(698, 43, 1, 0, 0);
	set_self(3107, 43, 1, 0, 0);
	for (var spid = 206; spid <= 212; spid++) {
		set_self(spid, 37, 1, 0, 0);
	}

}
GameUI.SelectHistory = function() { //选择历史记录 
	GameData.ChatPage = 3;
	set_self(ConstVal.Emotion.f_spid, 37, 0, 0, 0);
	set_self(ConstVal.Com_History.f_spid, 37, 1, 0, 0);
	set_self(ConstVal.sysNotice.f_spid, 37, 0, 0, 0);
	set_self(188, 43, 1, 0, 0);
	set_self(203, 43, 1, 0, 0);
	set_self(698, 43, 2, 0, 0);
	set_self(3107, 43, 1, 0, 0);
	for (var spid = 206; spid <= 212; spid++) {
		set_self(spid, 37, 0, 0, 0);
	}
	GameUI.createCommunion(GameData.communionHistory);

}
GameUI.SelectEmotion = function() { //选择表情 
	GameData.ChatPage = 2;
	GameUI.clearCommunion();
	set_self(ConstVal.Com_History.f_spid, 37, 0, 0, 0);
	set_self(ConstVal.sysNotice.f_spid, 37, 0, 0, 0);
	set_self(188, 43, 1, 0, 0);
	set_self(203, 43, 2, 0, 0);
	set_self(698, 43, 1, 0, 0);
	set_self(3107, 43, 1, 0, 0);
	for (var spid = 206; spid <= 212; spid++) {
		set_self(spid, 37, 0, 0, 0);
	}
	set_self(ConstVal.Emotion.f_spid, 37, 1, 0, 0);
	if (!GameData.isCreateEmotion) {
		var col = -1;
		var ind = 0;
		for (var i = 0; i < ConstVal.Emotion.count; i++) {
			ind = i % ConstVal.Emotion.col_num;
			if (ind == 0) { //换行 
				col++;
			}
			ifast_addtospritefromspritecopy(ConstVal.Emotion.f_spid, ConstVal.Emotion.spid_list[i], ConstVal.Emotion.x + ind * (ConstVal.Emotion.dis_x + ConstVal.Emotion.w), ConstVal.Emotion.y + col * (ConstVal.Emotion.y + ConstVal.Emotion.h), ConstVal.Emotion.tag + i);


		}
		if (col >= 0) {
			set_self(ConstVal.Emotion.f_spid, 21, ConstVal.Emotion.y + (col + 1) * (ConstVal.Emotion.y + ConstVal.Emotion.h), 0, 0);
		}

		GameData.isCreateEmotion = true;
	}


}
//切换系统公告 
GameUI.SelectSysNotice = function() {
	GameData.ChatPage = 4;
	set_self(ConstVal.Emotion.f_spid, 37, 0, 0, 0);
	set_self(ConstVal.Com_History.f_spid, 37, 0, 0, 0);

	set_self(188, 43, 1, 0, 0);
	set_self(203, 43, 1, 0, 0);
	set_self(698, 43, 1, 0, 0);
	set_self(3107, 43, 2, 0, 0);
	for (var spid = 206; spid <= 212; spid++) {
		set_self(spid, 37, 0, 0, 0);
	}
	GameUI.setSysNoticeReaded();
	GameUI.updateSysNoticeCount();
	set_self(ConstVal.sysNotice.f_spid, 18, ConstVal.sysNotice.clip_x, 0, 0);
	GameUI.createSysNotice(GameData.sysNotice);

}
//更新系统消息气泡
GameUI.updateSysNoticeBubble = function(_msg) {
	if (get_self(153, 37, 0, 0, 0) == 0) {
		return;
	}
	var limit = 8;
	var msgAry = _msg.split(ConstVal.sysNotice.msg_rOld);
	//var msg = "";
	if (msgAry.length >= 1) {
		//msg += Func.subString(msgAry[0],limit,true)+"\n";
		set_rec(1, Func.subString(msgAry[0], limit, true));
	} else {
		//msg+="\n";
		set_rec(1, "");
	}
	if (msgAry.length >= 2) {
		//msg += Func.subString(msgAry[1],limit-4,true)+"详...";
		set_rec(2, Func.subString(msgAry[1], limit - 4, true) + "详...");
	} else {
		//msg+="详...";
		set_rec(2, "详...");
	}

	if (get_self(153, 37, 0, 0, 0) && !get_self(187, 37, 0, 0)) {
		//set_self(3116,7,msg,0,0);

		set_self(3115, 37, 1, 0, 0);
		//set_self(3116,37,1,0,0);
		set_self(3115, 35, 255, 0, 0);
		//set_self(3116,35,255,0,0);
		play_ani(1, 3115, 35, 255, 0, 0, 1000, 0, 800, 0, 1, 0, 0);
		//play_ani(1,3116,35,255,0,0,800,0,500,0,1,0,0);
		//set_self(3115,33,100,0,0);
		//set_self(3116,33,100,0,0);
		//play_ani(1,3115,33,100,0,0,800,0,500,0,1,0,0);
		//play_ani(1,3116,33,100,0,0,800,0,500,0,1,0,0);
	}
	GameUI.updateSysNoticeCount2();
	//return msg;
}
//调整公告
GameUI.addSysNotice = function(_sysNotice) {
	var msgAry = _sysNotice.split(ConstVal.sysNotice.msg_rOld);
	var lenLimit = Math.floor((ConstVal.sysNotice.clip_w - ConstVal.sysNotice.spaceX * 2 - ConstVal.sysNotice.bm_space_x * 2) / ConstVal.sysNotice.msg_width);
	for (var i = 0; i < msgAry.length; i++) {
		msgAry[i] = Func.insertFlag(msgAry[i], ConstVal.sysNotice.msg_rOld, lenLimit, true);
	}
	var bTemp = false;
	if (get_self(ConstVal.sysNotice.f_spid, 37, 0, 0, 0) == 1) {
		bTemp = true;
	}
	var msg = msgAry.join(ConstVal.sysNotice.msg_rOld);
	var line = Func.countFlag(msg, ConstVal.sysNotice.msg_rOld);
	var sysData = {};
	sysData.msg = min_replaceAll(msg, ConstVal.sysNotice.msg_rOld, ConstVal.sysNotice.msg_rNew);
	sysData.line = line;
	sysData.read = bTemp;
	GameData.sysNotice.push(sysData);
	GameUI.updateSysNoticeCount();

	if (get_self(ConstVal.sysNotice.f_spid, 37, 0, 0, 0)) {
		//set_self(ConstVal.sysNotice.f_spid,19,height,0,0);
		GameUI.createSysNotice(GameData.sysNotice);
	}
}
//更新系统消息个数提示
GameUI.updateSysNoticeCount = function() {
	GameUI.updateSysNoticeCount2();
	var count = GameUI.countSysNoticeUnRead();
	if (count == 0) {
		set_self(3112, 37, 0, 0, 0);
		set_self(3114, 37, 0, 0, 0);
		return;
	} else {
		if (count >= 10) {
			if (count < 100) {
				set_self(3112, 18, 653, 0, 0);
				set_self(3112, 20, 37, 0, 0);
			} else {
				set_self(3112, 18, 643, 0, 0);
				set_self(3112, 20, 47, 0, 0);
			}

		} else {
			set_self(3112, 18, 663, 0, 0);
			set_self(3112, 20, 27, 0, 0);
		}
		if (get_self(3107, 37, 0, 0, 0) == 1) {
			set_self(3112, 37, 1, 0, 0);
			set_self(3114, 37, 1, 0, 0);
		} else {
			set_self(3112, 37, 0, 0, 0);
			set_self(3114, 37, 0, 0, 0);
			return;
		}
	}
	if (count < 100) {
		set_self(3114, 7, count, 0, 0);
		set_self(3114, 20, String(count).length * 12.5, 0, 0);
	} else {
		set_self(3114, 7, "99+", 0, 0);
		set_self(3114, 20, "99+".length * 12.5, 0, 0);
	}
	GameUI.adaptPositionSpid(3114, 3112);

}
GameUI.updateSysNoticeCount2 = function() {
	if (get_self(153, 37, 0, 0, 0) == 0) {
		return;
	}
	var count = GameUI.countSysNoticeUnRead();
	var posX = get_self(153, 18, 0, 0, 0) + get_self(153, 20, 0, 0, 0);
	//var posY = get_self(153,19,0,0,0)-13;
	if (count == 0) {
		set_self(3118, 37, 0, 0, 0);
		set_self(3119, 37, 0, 0, 0);
		return;
	} else {
		if (count >= 10) {
			if (count < 100) {
				set_self(3118, 20, 37, 0, 0);
				//set_self(3118,18,posX-get_self(3118,20,0,0,0)+10,0,0);

			} else {

				set_self(3118, 20, 47, 0, 0);
				//set_self(3118,18,posX-get_self(3118,20,0,0,0)+10,0,0);
			}

		} else {

			set_self(3118, 20, 27, 0, 0);
			//set_self(3118,18,posX-get_self(3118,20,0,0,0)+10,0,0);
		}
		if (get_self(153, 37, 0, 0, 0)) {
			set_self(3118, 37, 1, 0, 0);
			set_self(3119, 37, 1, 0, 0);
		} else {
			set_self(3118, 37, 0, 0, 0);
			set_self(3119, 37, 0, 0, 0);
			return;
		}
	}
	if (count < 100) {
		set_self(3119, 7, count, 0, 0);
		set_self(3119, 20, String(count).length * 12.5, 0, 0);
	} else {
		set_self(3119, 7, "99+", 0, 0);
		set_self(3119, 20, "99+".length * 12.5, 0, 0);
	}
	GameUI.adaptPositionSpid(3119, 3118);
}
//
//清除系统公告
GameUI.clearSysNotice = function() {
	//GameData.sysNotice=[];
	for (var i = 0; i < GameData.sysCreateLength; i++) {
		ifast_dllpritefromspritecopy(ConstVal.sysNotice.f_spid, ConstVal.sysNotice.bubble_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.sysNotice.f_spid, ConstVal.sysNotice.msg_tag + i);
	}
	GameData.sysCreateLength = 0;
}
//将所有设置为已读
GameUI.setSysNoticeReaded = function() {
	for (var i = 0; i < GameData.sysNotice.length; i++) {
		GameData.sysNotice[i].read = true;
	}
}
//统计未读个数
GameUI.countSysNoticeUnRead = function() {
	var rValue = 0;
	for (var i = 0; i < GameData.sysNotice.length; i++) {
		if (!GameData.sysNotice[i].read) {
			rValue++;
		}
	}
	return rValue;
}
//创建系统公告 
GameUI.createSysNotice = function(_sysNotice) {
	GameUI.clearSysNotice();
	var height = ConstVal.sysNotice.y;
	var maxWidth = ConstVal.sysNotice.clip_w - ConstVal.sysNotice.x * 2;
	set_self(ConstVal.sysNotice.f_spid, 37, 1, 0, 0);
	for (var i = 0; i < GameData.sysNotice.length; i++) {

		// 气泡 
		var bubble = ifast_addtospritefromspritecopy(ConstVal.sysNotice.f_spid, ConstVal.sysNotice.bubble_spid, ConstVal.sysNotice.x, ConstVal.sysNotice.y + height, ConstVal.sysNotice.bubble_tag + i);
		set_self(bubble, 20, maxWidth, 0, 0);
		set_self(bubble, 21, ConstVal.sysNotice.lineHeight * GameData.sysNotice[i].line + ConstVal.sysNotice.bm_space_y * 2, 0, 0);
		//内容
		var notice = ifast_addtospritefromspritecopy(ConstVal.sysNotice.f_spid, ConstVal.sysNotice.msg_spid, ConstVal.sysNotice.x + ConstVal.sysNotice.bm_space_x, ConstVal.sysNotice.bm_space_y + height, ConstVal.sysNotice.msg_tag + i);
		set_self(notice, 7, GameData.sysNotice[i].msg, 0, 0);

		height += ConstVal.sysNotice.lineHeight * GameData.sysNotice[i].line + ConstVal.sysNotice.bm_space_y * 2 + ConstVal.sysNotice.noteSpace;
	}
	GameData.sysCreateLength = GameData.sysNotice.length;
	set_self(ConstVal.sysNotice.f_spid, 21, height, 0, 0);

}
GameUI.ShowEmotion = function(v, ind) {
	ind = Number(ind);
	if (v == 0) {
		GameUI.CloseChat();
	}
	set_self(468 + v, 18, get_self(376 + v, 18, 0, 0, 0), 0, 0);
	set_self(468 + v, 19, get_self(376 + v, 19, 0, 0, 0), 0, 0);
	set_self(468 + v, 20, get_self(376 + v, 20, 0, 0, 0), 0, 0);
	set_self(468 + v, 21, get_self(376 + v, 21, 0, 0, 0), 0, 0);
	set_self(498 + v, 18, get_self(376 + v, 18, 0, 0, 0), 0, 0);
	set_self(498 + v, 19, get_self(376 + v, 19, 0, 0, 0), 0, 0);
	set_self(498 + v, 20, get_self(376 + v, 20, 0, 0, 0), 0, 0);
	set_self(498 + v, 21, get_self(376 + v, 21, 0, 0, 0), 0, 0);
	set_self(468 + v, 37, 1, 0, 0);
	set_self(498 + v, 1, ConstVal.Emotion.src_list[ind - 1], 0, 0);
	set_self(498 + v, 37, 1, 0, 0);
	var t = 1;
	if (ConstVal.Emotion.mode == 1) {
		t = (ConstVal.Emotion.frame_list[ind - 1] + 1) * ConstVal.Emotion.rate;
	} else {
		t = ConstVal.Emotion.show_time_list[ind - 1];
	}
	if (ConstVal.Emotion.frame_list[ind - 1] <= 3) {
		play_ani(1, 498 + v, 43, 1, ConstVal.Emotion.frame_list[ind - 1], 0, t, 0, 0, 0, 7, 0, 0);
	} else if (ConstVal.Emotion.frame_list[ind - 1] <= 5) {
		play_ani(1, 498 + v, 43, 1, ConstVal.Emotion.frame_list[ind - 1], 0, t, 0, 0, 0, 4, 0, 0);
	} else if (ConstVal.Emotion.frame_list[ind - 1] <= 8) {
		play_ani(1, 498 + v, 43, 1, ConstVal.Emotion.frame_list[ind - 1], 0, t, 0, 0, 0, 3, 0, 0);
	} else if (ConstVal.Emotion.frame_list[ind - 1] <= 15) {
		play_ani(1, 498 + v, 43, 1, ConstVal.Emotion.frame_list[ind - 1], 0, t, 0, 0, 0, 2, 0, 0);
	} else {
		play_ani(1, 498 + v, 43, 1, ConstVal.Emotion.frame_list[ind - 1], 0, t, 0, 0, 0, 1, 0, 0);
	}



}

GameUI.ShowChat = function(v, text) {
	text = String(text);
	set_self(204, 7, "", 0, 0);
	if (v == 0) {
		this.CloseChat();
	}
	var x = Game_Config.Chat.ChatLoc[v][0];
	var y = Game_Config.Chat.ChatLoc[v][1];
	var dis_x = Game_Config.Chat.ChatDis[0];
	var dis_y = Game_Config.Chat.ChatDis[1];
	var isleft = Game_Config.Chat.isLeft[v];
	var text_w = Game_Config.Chat.textwidth;
	var text_len = text.gblen();
	if (isleft) {
		set_self(552 + v, 18, x, 0, 0);
		set_self(552 + v, 19, y, 0, 0);
		set_self(582 + v, 18, x + dis_x, 0, 0);
		set_self(582 + v, 19, y + dis_y, 0, 0);
		set_self(582 + v, 7, text, 0, 0);
		set_self(552 + v, 20, text_len * text_w + dis_x * 2, 0, 0);
		set_self(552 + v, 1, 83, 0, 0);
		set_self(552 + v, 37, 1, 0, 0);
		set_self(582 + v, 37, 1, 0, 0);
	} else {
		set_self(552 + v, 18, x - text_len * text_w - dis_x * 2, 0, 0);
		set_self(582 + v, 18, x - text_len * text_w - dis_x, 0, 0);
		set_self(552 + v, 19, y, 0, 0);
		set_self(582 + v, 19, y + dis_y, 0, 0);

		set_self(582 + v, 7, text, 0, 0);
		set_self(552 + v, 20, text_len * text_w + dis_x * 2, 0, 0);
		set_self(552 + v, 1, 86, 0, 0);
		set_self(552 + v, 37, 1, 0, 0);
		set_self(582 + v, 37, 1, 0, 0);

	}
	play_ani(1, 552 + v, 43, 1, 1, 0, Game_Config.Max.ShowChat, 0, 0, 0, 1, 0, 0);

}
GameUI.HideChat = function() {
	set_group(75, 37, 0, 0, 0);
}
GameUI.OpenTips = function(_msg, time, mode) {
	try {
		// if(!String(_msg)){
		// return;
		// }
		//if(GameData.tipTimer1){
		//	GameData.tipTimer1 = null;
		//	clearTimeout(GameData.tipTimer1);
		//}
		if (!_msg) {
			return;
		}
		if (time) {
			if (time > 0) {
				GameData.tipTimer1 = setTimeout("GameUI.CloseTips()", time);
			}
		}
		switch (mode) {
		case 1:
			set_self(217, 19, 126, 0, 0);
			set_self(218, 19, 161, 0, 0);
			break;
		case 2:
			set_self(217, 19, 418, 0, 0);
			set_self(218, 19, 453, 0, 0);
			break;
		default:
			set_self(217, 19, 276, 0, 0);
			set_self(218, 19, 311, 0, 0);
			break;
		}
		length
		var w = 14.5;
		//	var arr = Logic.countText(_msg);
		//	if(arr.>1){
		//	set_self(218,7,_msg,0,0);
		//	set_self(217,20,arr[1]*14+100,0,0);
		//	set_self(217,18,640-get_self(217,20,0,0,0)/2,0,0);
		//set_self(218,18,640-_msg.gblen()*7,0,0);
		//	set_self(217,37,1,0,0);
		//set_self(218,37,1,0,0);
		//	}else{
		set_self(218, 7, _msg, 0, 0);
		set_self(217, 20, _msg.gblen() * w + 100, 0, 0);
		set_self(217, 18, 640 - get_self(217, 20, 0, 0, 0) / 2, 0, 0);
		set_self(218, 18, 640 - _msg.gblen() * w / 2, 0, 0);
		set_self(217, 37, 1, 0, 0);
		set_self(218, 37, 1, 0, 0);
		//	}


		//set_self(393,37,1,0,0);
	} catch (e) {

	}
}
GameUI.CloseTips = function() {
	//if(GameData.tipTimer1){
	//	GameData.tipTimer1 = null;
	//	clearTimeout(GameData.tipTimer1);
	//}
	set_self(217, 37, 0, 0, 0);
	set_self(218, 37, 0, 0, 0);
}
GameUI.ShowNotice = function(_msg) { //打开公告通知
	if (_msg) {
		set_self(220, 7, _msg, 0, 0);
		set_self(220, 18, Game_Config.Notice.x2, 0, 0);
		set_self(219, 37, 1, 0, 0);
		set_self(220, 37, 1, 0, 0);
		set_self(45, 37, 1, 0, 0);
		var len = _msg.gblen() * Game_Config.Notice.width;
		var t = (len + Game_Config.Notice.x2 - Game_Config.Notice.x1) / Game_Config.Notice.speed;
		play_ani(1, 220, 18, Game_Config.Notice.x2, Game_Config.Notice.x1 - len, 0, t, 0, 0, 0, 0, 0, 0);
	}
}
GameUI.HideNotice = function() { //关闭公告通知
	set_self(219, 37, 0, 0, 0);
	set_self(220, 37, 0, 0, 0);
	set_self(45, 37, 0, 0, 0);
	play_ani(0, 220, 18);
}
GameUI.OpenKick = function(text) { //打开强制下线界面
	set_self(225, 18, 640 - get_self(225, 20, 0, 0, 0) / 2, 0, 0);
	set_self(227, 7, text, 0, 0);
	set_self(227, 18, 640 - text.gblen() * 7.5, 0, 0);
	set_group(33, 37, 1, 0, 0);
}
GameUI.SetOnState = function(seat, v) {
	var ind = Logic.ChangeToStatus(C_Player.seat, seat);
	GameUI.onstate[ind] = v;
}
GameUI.SetIsprepare = function(seat, v) {
	var ind = Logic.ChangeToStatus(C_Player.seat, seat);
	this.isprepare[ind] = v;
	if (seat == C_Player.seat) {
		C_Player.isprepare = v;
	}
}
GameUI.Openupdataroomcard = function(_msg) {
	if (GameData.versionState != 1) {
		if (_msg) {
			set_self(229, 7, _msg, 0, 0);
			set_self(229, 18, 640 - _msg.gblen() * 5.25, 0, 0);
			set_self(228, 18, 640 - get_self(228, 20, 0, 0, 0) / 2, 0, 0);
			set_group(34, 37, 1, 0, 0);
		}
	}

}

GameUI.Closeupdataroomcard = function() {
	set_group(34, 37, 0, 0, 0);
}
GameUI.openUpdateBean = function(_msg) {
	if (GameData.versionState != 1) {
		if (_msg) {
			set_self(229, 7, _msg, 0, 0);
			set_self(229, 18, 640 - _msg.gblen() * 5.25, 0, 0);
			set_self(228, 18, 640 - get_self(228, 20, 0, 0, 0) / 2, 0, 0);
			set_group(34, 37, 1, 0, 0);
		}
	}

}

GameUI.closeUpdateBean = function() {
	set_group(34, 37, 0, 0, 0);
}
GameUI.OpenDisConnect = function() {
	if (get_self(230, 37, 0, 0, 0) == 0) {
		set_group(35, 37, 1, 0, 0);
		play_ani(1, 232, 43, 1, 9, 0, 800, 0, 0, 0, 0, 0, 0);
	}

}
GameUI.CloseDisConnect = function() {
	set_group(35, 37, 0, 0, 0);
}
GameUI.openCheck = function(_msg) {
	Utl.playSound(Game_Config.ClickButton.src_2);
	//if(GameData.versionState == 1){

	//set_self(361,7,"       是否解散房间？",0,0);
	//}else{
	//set_self(361,7,"解散房间不扣"+GameData.roomCardName+"，是否解散？",0,0);
	//}
	set_self(361, 7, _msg, 0, 0);
	set_self(361, 18, get_self(244, 18, 0, 0, 0) + get_self(244, 20, 0, 0, 0) / 2 - String(_msg).gblen() * 8.5);
	set_group(36, 37, 1, 0, 0);
}
GameUI.closeCheck = function() {
	GameData.checkType = 1;
	set_group(36, 37, 0, 0, 0);
}
GameUI.OpenProtocol = function() {
	Utl.playSound(Game_Config.ClickButton.src_2);
	GameData.Protocol_H = get_self(252, 21, 0, 0, 0);
	set_self(252, 18, Game_Config.Protocol.x, 0, 0);
	set_self(252, 19, Game_Config.Protocol.y, 0, 0);
	set_group(37, 37, 1, 0, 0);
}
GameUI.CloseProtocol = function() {
	set_group(37, 37, 0, 0, 0);
}
GameUI.StartLoadData = function() {

}
GameUI.EndLoadData = function() {

}
GameUI.PlayEffect = function(seat1, seat2, type) { //播放互动动画 
	if (Logic.ChangeToStatus(C_Player.seat, seat1) == 0) {
		GameUI.CloseInfo();
	}
	if (type != null) {

		set_self(466, 37, 1, 0, 0);
		var spid;
		var spid_s = 376 + Logic.ChangeToStatus(C_Player.seat, seat1);
		var spid_e = 376 + Logic.ChangeToStatus(C_Player.seat, seat2);
		var s1_xy = [];
		var s2_xy = [];
		var frame;
		var _time = [];
		switch (type) {
		case 4:
			//抓鸡
			spid = 302;
			s1_xy = [get_self(spid_s, 18) - 15, get_self(spid_s, 19)];
			s2_xy = [get_self(spid_e, 18) - 15, get_self(spid_e, 19) - 15];
			frame = 12;
			_time = [2400, 200];
			setTimeout(function() {
				Utl.playSound(ConstVal.InterEffSoundsList[0]);
			}, 700);
			break;
		case 3:
			//碰杯
			spid = 297;
			s1_xy = [get_self(spid_s, 18) - 35, get_self(spid_s, 19) - 10];
			s2_xy = [get_self(spid_e, 18) - 35, get_self(spid_e, 19) - 10];

			frame = 4;
			_time = [600, 500];
			setTimeout(function() {
				Utl.playSound(ConstVal.InterEffSoundsList[1]);
			}, 700);
			break;
		case 1:
			//炸弹
			spid = 274;
			s1_xy = [get_self(spid_s, 18) - 25, get_self(spid_s, 19) - 25];
			s2_xy = [get_self(spid_e, 18) - 25, get_self(spid_e, 19) - 25];
			frame = 7;
			_time = [1200, 1000];
			setTimeout(function() {
				Utl.playSound(ConstVal.InterEffSoundsList[2]);
			}, 700);
			break;
		case 2:
			//鲜花
			spid = 292;
			s1_xy = [get_self(spid_s, 18) - 6, get_self(spid_s, 19)];
			s2_xy = [get_self(spid_e, 18) - 6, get_self(spid_e, 19)];
			frame = 12;
			_time = [2400, 200];
			setTimeout(function() {
				Utl.playSound(ConstVal.InterEffSoundsList[3]);
			}, 700);
			break;
		default:
			return;
			break;
		}
		var zid = 10000 * seat1 + ifast_random(10000);
		var copySpid = ifast_addtospritefromspritecopy(466, spid, 0, 0, zid);
		set_self(copySpid, 18, s1_xy[0], 0, 0);
		set_self(copySpid, 19, s1_xy[1], 0, 0);
		set_self(copySpid, 41, 0, 0, 0);
		set_self(copySpid, 37, 1, 0, 0);

		play_ani(1, copySpid, 18, s1_xy[0], s2_xy[0], 0, 700, 0, 0, 0, 1, 0, 0);
		play_ani(1, copySpid, 19, s1_xy[1], s2_xy[1], 0, 700, 0, 0, 0, 1, 0, 0);
		play_ani(1, copySpid, 43, 1, frame, 0, _time[0], 0, 700, 0, 1, 0, 0);

		GameUI.PlayEffect_clear(zid, _time);
	} else {
		set_self(149, 37, 0, 0, 0);
	}
}
GameUI.PlayEffect_clear = function(zid, _time) { //关闭单个互动动画
	window.setTimeout(function() {
		ifast_dllpritefromspritecopy(466, zid);
	}, _time[0] + _time[1] + 700);
};

GameUI.play_voice = function(_msg, type, v) {
	Func.mediaTypeAudio(_msg, type, v);

}

function gameui_play_voice(v) {
	v = Number(v);
	var bTemp = false;
	if (v >= ConstVal.Com_History.content_tag) {
		bTemp = true;
	}
	if (bTemp) {
		play_ani(1, ConstVal.Com_History.f_spid + "add" + v, 43, 1, 3, 0, 600, 0, 0, 0, 0, 0, 0);
	} else {
		var x = Game_Config.Voice.VoiceLoc[v][0];
		var y = Game_Config.Voice.VoiceLoc[v][1];
		var dis_x = Game_Config.Voice.VoiceDis[0];
		var dis_y = Game_Config.Voice.VoiceDis[1];
		var isleft = Game_Config.Voice.isLeft[v];
		var text_len = get_self(642 + v, 20, 0, 0, 0);
		if (isleft) {
			set_self(612 + v, 18, x, 0, 0);
			set_self(612 + v, 19, y, 0, 0);
			set_self(642 + v, 18, x + dis_x, 0, 0);
			set_self(642 + v, 19, y + dis_y, 0, 0);
			set_self(612 + v, 20, text_len + dis_x * 2, 0, 0);
			set_self(612 + v, 1, 83, 0, 0);
			set_self(612 + v, 37, 1, 0, 0);
			set_self(642 + v, 37, 1, 0, 0);
		} else {
			set_self(612 + v, 18, x - text_len - dis_x * 2, 0, 0);
			set_self(642 + v, 18, x - text_len - dis_x, 0, 0);
			set_self(612 + v, 19, y, 0, 0);
			set_self(642 + v, 19, y + dis_y, 0, 0);
			set_self(612 + v, 20, text_len + dis_x * 2, 0, 0);
			set_self(612 + v, 1, 86, 0, 0);
			set_self(612 + v, 37, 1, 0, 0);
			set_self(642 + v, 37, 1, 0, 0);

		}
		play_ani(1, 642 + v, 43, 1, 3, 0, Game_Config.Voice.VoiceTime, 0, 0, 0, 0, 0, 0);
	}
}

function gameui_stop_voice(v) {
	v = Number(v);
	var bTemp = false;
	if (v >= ConstVal.Com_History.content_tag) {
		bTemp = true;
	}
	if (bTemp) {
		play_ani(0, ConstVal.Com_History.f_spid + "add" + v, 43, 1, 3, 0, 600, 0, 0, 0, 0, 0, 0);
		set_self(ConstVal.Com_History.f_spid + "add" + v, 43, 3, 0, 0);
	} else {
		set_self(612 + v, 37, 0, 0, 0);
		set_self(642 + v, 37, 0, 0, 0);
		play_ani(0, 642 + v, 43);
	}
}

GameUI.ShowiMessage = function(_msg) {
	set_self(333, 7, _msg, 0, 0);
	set_self(333, 41, 0, 0, 0);
	set_self(334, 41, 0, 0, 0);
	set_self(332, 18, 0, 0, 0);
	set_self(332, 19, ConstVal.iMessage.bg_y1, 0, 0);
	set_self(334, 18, ConstVal.iMessage.icon_x, 0, 0);
	set_self(335, 18, ConstVal.iMessage.close_x, 0, 0);
	var len = _msg.gblen();
	if (len <= ConstVal.iMessage.max_length) {
		set_self(333, 18, 640 - len * 8.5, 0, 0);
		set_group(41, 37, 1, 0, 0);
		play_ani(1, 332, 19, ConstVal.iMessage.bg_y1, ConstVal.iMessage.bg_y2, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
		play_ani(1, 333, 19, ConstVal.iMessage.text_y1, ConstVal.iMessage.text_y2, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
		play_ani(1, 334, 19, ConstVal.iMessage.icon_y1, ConstVal.iMessage.icon_y2, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
		play_ani(1, 335, 19, ConstVal.iMessage.close_y1, ConstVal.iMessage.close_y2, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
	} else {
		set_self(333, 18, ConstVal.iMessage.x2, 0, 0);
		set_group(41, 37, 1, 0, 0);
		play_ani(1, 332, 19, ConstVal.iMessage.bg_y1, ConstVal.iMessage.bg_y2, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
		play_ani(1, 333, 19, ConstVal.iMessage.text_y1, ConstVal.iMessage.text_y2, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
		play_ani(1, 334, 19, ConstVal.iMessage.icon_y1, ConstVal.iMessage.icon_y2, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
		play_ani(1, 335, 19, ConstVal.iMessage.close_y1, ConstVal.iMessage.close_y2, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
		play_ani(1, 333, 18, ConstVal.iMessage.x2, ConstVal.iMessage.x1 - len * 6.75, 0, len * 6.75 / ConstVal.iMessage.speed, 0, 0, 0, 0, 0, 0);
	}
}
GameUI.HideiMessage = function(_msg) {
	play_ani(1, 332, 19, ConstVal.iMessage.bg_y2, ConstVal.iMessage.bg_y1, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
	play_ani(1, 333, 19, ConstVal.iMessage.text_y2, ConstVal.iMessage.text_y1, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
	play_ani(1, 334, 19, ConstVal.iMessage.icon_y2, ConstVal.iMessage.icon_y1, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
	play_ani(1, 335, 19, ConstVal.iMessage.close_y2, ConstVal.iMessage.close_y1, 0, ConstVal.iMessage.time, 0, 0, 0, 1, 0, 0);
	play_ani(0, 333, 18);
}
//打开二维码 
GameUI.Open_ewm = function() {
	if (GameData.wechat_ewm) {
		Utl.playSound(Game_Config.ClickButton.src_2);
		Func.up_imgurl(115, GameData.wechat_ewm);

		set_group(42, 37, 1, 0, 0);
	}
}
//打开二维码
GameUI.Close_ewm = function() {
	set_group(42, 37, 0, 0, 0);
}
GameUI.OpenFeedback = function(bTemp) {
	Utl.playSound(Game_Config.ClickButton.src_2);
	set_group(74, 37, 1, 0, 0);
	if(bTemp){
		set_self(550,37,0,0,0);
	}else{
		set_self(3265,37,0,0,0);
		set_self(3266,37,0,0,0);
	}
}
GameUI.CloseFeedback = function() {
	var obj = gameabc_face.getdiv("div551");
	obj.blur();
	set_self(551,7,"",0,0);
	set_group(74, 37, 0, 0, 0);
}
GameUI.getFeedbackText = function() {
	return get_self(551, 7, 0, 0, 0);
}
//创建历史记录
GameUI.createCommunion = function(c_list) {
	if (c_list) {
		if (c_list.length) {
			var len = c_list.length;
			var head = "";
			var bubble = "";
			var content = "";
			var contentLen = 0;
			for (var i = 0; i < len; i++) {
				head = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 697, ConstVal.Com_History.head_x, ConstVal.Com_History.head_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.head_tag + i); //头像
				set_self(head, 1, ConstVal.Com_History.head_res_id + c_list[i][0]);
				bubble = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 163, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.bubble_tag + i); //气泡 
				if (c_list[i][1] == 1) { //文字 
					content = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 164, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x + ConstVal.Com_History.bubble_content_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + ConstVal.Com_History.head_content_1_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.content_tag + i); //气泡
					set_self(content, 7, c_list[i][2], 0, 0);
					contentLen = String(c_list[i][2]).gblen() * ConstVal.Com_History.text_width;
					set_self(bubble, 20, contentLen + ConstVal.Com_History.bubble_content_dis_x * 2, 0, 0);
					time_show = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 480, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x + contentLen + ConstVal.Com_History.time_bubble_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + ConstVal.Com_History.time_bubble_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.time_tag + i); //时长
					set_self(time_show, 7, "", 0, 0);
				} else if (c_list[i][1] == 2) { //语音 
					content = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 165, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x + ConstVal.Com_History.bubble_content_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + ConstVal.Com_History.head_content_2_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.content_tag + i); //气泡
					//set_self(bubble,20,ConstVal.Com_History.bubble_width[ConstVal.Com_History.bubble_width.length-1],0,0);
					contentLen = ConstVal.Com_History.bubble_width[ConstVal.Com_History.bubble_width.length - 1];
					for (var k = 0; k < ConstVal.Com_History.time_length.length; k++) {
						if (GameData.communionHistory[i][3] <= ConstVal.Com_History.time_length[k]) {
							contentLen = ConstVal.Com_History.bubble_width[k];

							break;
						}
						//contentLen = ConstVal.Com_History.bubble_width[k+1];
					}

					set_self(bubble, 20, contentLen, 0, 0);
					time_show = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 480, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x + contentLen + ConstVal.Com_History.time_bubble_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + ConstVal.Com_History.time_bubble_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.time_tag + i); //时长
					set_self(time_show, 7, GameData.communionHistory[i][3] + "\''", 0, 0);
				}



			}


			set_self(ConstVal.Com_History.f_spid, 21, len * (ConstVal.Com_History.head_h + ConstVal.Com_History.head_dis_y) + ConstVal.Com_History.head_x * 2, 0, 0);
			if (len <= ConstVal.Com_History.page_count) {
				set_self(ConstVal.Com_History.f_spid, 19, ConstVal.Com_History.clip_y);
			} else {
				set_self(ConstVal.Com_History.f_spid, 19, ConstVal.Com_History.clip_y - (len - ConstVal.Com_History.page_count) * (ConstVal.Com_History.head_h + ConstVal.Com_History.head_dis_y), 0, 0);
			}

			GameData.createHistoryLen = len;
		}
	}
}
//添加一条历史记录 
GameUI.addCommunion = function(status, type, data, tlen, kfData, sex) {

	GameData.communionHistory.push([status, type, data, tlen, kfData, sex]);
	var c_list = GameData.communionHistory;
	if (get_self(ConstVal.Com_History.f_spid, 37, 0, 0) == 1) { //在历史记录界面 
		var len = c_list.length;
		var head = "";
		var bubble = "";
		var content = "";
		var contentLen = 0;
		var time_show = "";
		i = len - 1;
		//for(var i=0;i<len;i++){
		head = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 697, ConstVal.Com_History.head_x, ConstVal.Com_History.head_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.head_tag + i); //头像
		set_self(head, 1, ConstVal.Com_History.head_res_id + c_list[i][0]);
		bubble = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 163, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.bubble_tag + i); //气泡
		if (c_list[i][1] == 1) { //文字
			content = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 164, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x + ConstVal.Com_History.bubble_content_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + ConstVal.Com_History.head_content_1_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.content_tag + i); //文字内容 
			set_self(content, 7, c_list[i][2], 0, 0);
			contentLen = String(c_list[i][2]).gblen() * ConstVal.Com_History.text_width;
			set_self(bubble, 20, contentLen + ConstVal.Com_History.bubble_content_dis_x * 2, 0, 0);
			time_show = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 480, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x + contentLen + ConstVal.Com_History.time_bubble_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + ConstVal.Com_History.time_bubble_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.time_tag + i); //时长
			set_self(time_show, 7, "", 0, 0);
		} else if (c_list[i][1] == 2) { //语音
			content = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 165, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x + ConstVal.Com_History.bubble_content_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + ConstVal.Com_History.head_content_2_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.content_tag + i); //语音动画 
			contentLen = ConstVal.Com_History.bubble_width[ConstVal.Com_History.bubble_width.length - 1];
			for (var k = 0; k < ConstVal.Com_History.time_length.length; k++) {
				if (GameData.communionHistory[i][3] <= ConstVal.Com_History.time_length[k]) {
					contentLen = ConstVal.Com_History.bubble_width[k];

					break;
				}

			}

			set_self(bubble, 20, contentLen, 0, 0);
			time_show = ifast_addtospritefromspritecopy(ConstVal.Com_History.f_spid, 480, ConstVal.Com_History.head_x + ConstVal.Com_History.head_bubble_dis_x + contentLen + ConstVal.Com_History.time_bubble_dis_x, ConstVal.Com_History.head_y + ConstVal.Com_History.head_bubble_dis_y + ConstVal.Com_History.time_bubble_dis_y + i * (ConstVal.Com_History.head_dis_y + ConstVal.Com_History.head_h), ConstVal.Com_History.time_tag + i); //时长 
			set_self(time_show, 7, GameData.communionHistory[i][3] + "\''", 0, 0);

		}


		//}


		set_self(ConstVal.Com_History.f_spid, 21, len * (ConstVal.Com_History.head_h + ConstVal.Com_History.head_dis_y) + ConstVal.Com_History.head_x * 2, 0, 0);
		if (len <= ConstVal.Com_History.page_count) {
			set_self(ConstVal.Com_History.f_spid, 19, ConstVal.Com_History.clip_y);
		} else {
			var y1 = get_self(ConstVal.Com_History.f_spid, 19, 0, 0, 0) + (len - 1) * (ConstVal.Com_History.head_h + ConstVal.Com_History.head_dis_y) + ConstVal.Com_History.head_x * 2;
			var y0 = ConstVal.Com_History.clip_y + ConstVal.Com_History.page_count * (ConstVal.Com_History.head_h + ConstVal.Com_History.head_dis_y) + ConstVal.Com_History.head_x * 2;
			if (y1 - y0 - ConstVal.Com_History.head_h < 0) {
				set_self(ConstVal.Com_History.f_spid, 19, ConstVal.Com_History.clip_y - (len - ConstVal.Com_History.page_count) * (ConstVal.Com_History.head_h + ConstVal.Com_History.head_dis_y), 0, 0);
			}


		}

		GameData.createHistoryLen = len;
	} else { //不在 

	}
}
//删除所有历史记录 
GameUI.clearCommunion = function() {
	for (var i = 0; i < GameData.createHistoryLen; i++) {
		ifast_dllpritefromspritecopy(ConstVal.Com_History.f_spid, ConstVal.Com_History.head_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.Com_History.f_spid, ConstVal.Com_History.bubble_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.Com_History.f_spid, ConstVal.Com_History.content_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.Com_History.f_spid, ConstVal.Com_History.time_tag + i);
	}
	GameData.createHistoryLen = 0;
}
//搜索一条历史记录(根据下标) 
//GameUI.findCommunion =function(ind){

//}
GameUI.OpenPay = function() {
	Utl.playSound(Game_Config.ClickButton.src_2);
	GameData.payData[0] = 0;
	GameData.payData[1] = 0;
	set_self(360, 43, GameData.nameImgFrame_1, 0, 0);
	for (var i = 0; i < 8; i++) {
		set_self(416 + i, 43, GameData.nameImgFrame_1, 0, 0);
	}
	set_group(53, 37, 1, 0, 0);
	for (var i = 0; i < GameData.payList.length; i++) {
		var pricetext = "b" + parseInt(GameData.payList[i].money);
		var counttext = GameData.payList[i].amount + "张";
		set_self(426 + i, 7, counttext, 0, 0);
		set_self(426 + i, 18, get_self(416 + i, 18, 0, 0, 0) + get_self(416 + i, 20, 0, 0, 0) / 2 - counttext.gblen() * 8.5, 0, 0);
		set_self(446 + i, 7, pricetext, 0, 0);
		set_self(446 + i, 20, pricetext.length * 26, 0, 0);
		set_self(446 + i, 18, get_self(416 + i, 18, 0, 0, 0) + get_self(416 + i, 20, 0, 0, 0) / 2 - pricetext.length * 13, 0, 0);
	}
	for (var i = GameData.payList.length; i < 10; i++) {

		set_self(426 + i, 37, 0, 0, 0);
		set_self(416 + i, 37, 0, 0, 0);

		set_self(446 + i, 37, 0, 0, 0);

	}


}
GameUI.OpenCheckPay = function() {
	set_self(458, 43, GameData.nameImgFrame_1, 0, 0);
	set_group(54, 37, 1, 0, 0);
	GameData.payData[1] = 0;
	if (GameData.OS == ConstVal.OS.apple) {
		set_self(457, 21, 450, 0, 0);
		set_self(464, 19, 387, 0, 0);
		set_self(459, 37, 0, 0, 0);
		set_self(461, 37, 0, 0, 0);
		set_self(462, 37, 0, 0, 0);
		set_self(463, 37, 0, 0, 0);
		var text = "b" + parseInt(GameData.payList[GameData.payData[0]].money);
		set_self(460, 7, text, 0, 0);
		set_self(460, 20, text.length * 60, 0, 0);
		set_self(460, 18, get_self(457, 18, 0, 0, 0) + get_self(457, 20, 0, 0, 0) / 2 - text.length * 30, 0, 0);
	} else {
		set_self(457, 21, 520, 0, 0);
		set_self(464, 19, 484, 0, 0);
		set_self(461, 43, 2, 0, 0);
		set_self(462, 43, 3, 0, 0);
		set_self(463, 43, 5, 0, 0);
		var text = "b" + parseInt(GameData.payList[GameData.payData[0]].money);
		set_self(460, 7, text, 0, 0);
		set_self(460, 20, text.length * 60, 0, 0);
		set_self(460, 18, get_self(457, 18, 0, 0, 0) + get_self(457, 20, 0, 0, 0) / 2 - text.length * 30, 0, 0);

	}
}
GameUI.ClosePay = function() {
	set_group(53, 37, 0, 0, 0);
}
GameUI.CloseCheckPay = function() {
	set_group(54, 37, 0, 0, 0);
}
GameUI.switchPayType = function(type) {
	GameData.payData[1] = type;
	set_self(461, 43, 1, 0, 0);
	set_self(462, 43, 3, 0, 0);
	set_self(463, 43, 5, 0, 0)
	switch (type) {
	case 0:
		set_self(461, 43, 2, 0, 0);
		break;
	case 1:
		set_self(462, 43, 4, 0, 0);
		break;
	case 2:
		set_self(463, 43, 6, 0, 0);
		break;
	};
}
//显示计算器按钮 
GameUI.showCalBtn = function(input_arr, w) {
	var width = 28;
	if (w) {
		width = w;
	}
	if (input_arr) {
		GameData.OrgArr = [].concat(input_arr);
	}
	var mult = 1;
	if (Utl.checkKey(Utl.Config.multiple)) {
		var rd = Utl.ReadData(Utl.Config.multiple);
		if (GameUI.checkNumber(rd)) {
			var rt = Number(rd);
			if (rt > 0) {
				mult = rt;
			} else {
				Utl.SaveData(Utl.Config.multiple, "1");
			}
		} else {
			Utl.SaveData(Utl.Config.multiple, "1");
		}
	} else {
		Utl.SaveData(Utl.Config.multiple, "1");
	}
	GameData.Multiple = min_replaceAll(String(mult), "\\.", "b", false);
	set_self(370, 7, GameData.Multiple, 0, 0);
	set_self(370, 20, GameData.Multiple.length * width, 0, 0);
	set_self(283, 20, 203 + GameData.Multiple.length * width, 0, 0);
	set_group(78, 37, 1, 0, 0);
}
//隐藏计算器按钮
GameUI.hideCalBtn = function() {
	set_group(78, 37, 0, 0, 0);
}
GameUI.showCal = function() {
	Utl.playSound(Game_Config.ClickButton.src_2);
	set_self(373, 7, GameData.Multiple, 0, 0);
	set_self(373, 20, GameData.Multiple.length * 36, 0, 0);
	set_self(373, 18, get_self(372, 18, 0, 0, 0) + get_self(372, 20, 0, 0, 0) / 2 - GameData.Multiple.length * 18, 0, 0);
	set_group(79, 37, 1, 0, 0);
}
GameUI.hideCal = function() {
	set_group(79, 37, 0, 0, 0);
}
//得到计算的倍数
GameUI.getMultiple = function() {
	var result = min_replaceAll(String(GameData.Multiple), "b", ".", false);
	if (GameUI.checkNumber(result)) {
		var rt = Number(result);
		if (rt > 0) {
			return rt;
		} else {
			return false;
		}
	} else {
		return false;
	}
}
//输入是否合法
GameUI.checkNumber = function(input_data) { //
	var reg = /^[0-9]+.?[0-9]*$/;
	if (reg.test(input_data)) {
		return true;
	}
	return false;
}
//获得计算结果
GameUI.getResult = function(input_arr) {
	if (GameUI.checkNumber(rd)) {
		var rt = Number(rd);
		if (rt > 0) {
			return rt;
		} else {
			return false;
		}
	} else {
		return false;
	}
}
//输入 
GameUI.CalInput = function(spid) {
	var multiple_temp = GameData.Multiple;
	if (spid >= 392 && spid <= 402) {
		var input;
		if (spid == 402) {
			input = "b";
		} else {
			input = String(spid - 392);
		}


		if (multiple_temp == "0" && input != "b") {
			multiple_temp = input;
		} else {
			multiple_temp += input;
		}
		if (multiple_temp.length > 8) {
			GameUI.OpenTips("输入长度超过限制！", ConstVal.Tips.time);
		} else {
			if (GameUI.checkNumber(multiple_temp)) {
				GameData.Multiple = multiple_temp;
				set_self(373, 7, GameData.Multiple, 0, 0);
				set_self(373, 20, GameData.Multiple.length * 36, 0, 0);
				set_self(373, 18, get_self(372, 18, 0, 0, 0) + get_self(372, 20, 0, 0, 0) / 2 - GameData.Multiple.length * 18, 0, 0);
			} else {
				GameUI.OpenTips("输入不正确！", ConstVal.Tips.time);
			}
		}
	}
	if (spid == 391) { //删除 
		if (multiple_temp.length > 1) {
			GameData.Multiple = GameData.Multiple.substring(0, GameData.Multiple.length - 1);
			set_self(373, 7, GameData.Multiple, 0, 0);
			set_self(373, 20, GameData.Multiple.length * 36, 0, 0);
			set_self(373, 18, get_self(372, 18, 0, 0, 0) + get_self(372, 20, 0, 0, 0) / 2 - GameData.Multiple.length * 18, 0, 0);
		} else if (multiple_temp.length == 1) {
			GameData.Multiple = "0";
			set_self(373, 7, GameData.Multiple, 0, 0);
			set_self(373, 20, String(GameData.Multiple).length * 36, 0, 0);
			set_self(373, 18, get_self(372, 18, 0, 0, 0) + get_self(372, 20, 0, 0, 0) / 2 - String(GameData.Multiple).length * 18, 0, 0);
		}

	}
	if (spid == 403) { //确定 
		if (GameUI.checkNumber(GameData.Multiple)) {
			var input_mul = min_replaceAll(String(GameData.Multiple), "b", ".", false);
			input_mul = Number(input_mul);
			if (input_mul == 0) {
				input_mul = 1;
			}
			console.log("倍数：" + input_mul);
			GameData.MultiArr.length = GameData.OrgArr.length;
			for (var i = 0; i < GameData.MultiArr.length; i++) {
				//GameData.MultiArr[i] = GameData.MultiArr[i]*input_mul;
				GameData.MultiArr[i] = Func.accMul(GameData.OrgArr[i], input_mul);
			}
			Utl.SaveData(Utl.Config.multiple, input_mul);
			Game_Modify.calResult(GameData.MultiArr);
			GameUI.hideCal();
			GameData.Multiple = min_replaceAll(String(input_mul), "\\.", "b", false);
			set_self(370, 7, GameData.Multiple, 0, 0);
			set_self(370, 20, GameData.Multiple.length * 28, 0, 0);
			set_self(283, 20, 203 + GameData.Multiple.length * 28, 0, 0);
		} else {
			GameUI.OpenTips("输入不正确！", ConstVal.Tips.time);
		}
	}
}
GameUI.OpenBind = function() {
	GameUI.closePallet();
	Utl.playSound(Game_Config.ClickButton.src_2);
	set_group(80, 37, 1, 0, 0);
	set_self(365, 7, "", 0, 0);
	set_self(365, "type", "number");
	if (!C_Player.invitecode) { //已绑定 
		set_self(368, 37, 0, 0, 0);
	} else {
		set_self(365, 37, 0, 0, 0);
		set_self(366, 37, 0, 0, 0);
		set_self(367, 37, 0, 0, 0);
		set_self(368, 7, "您已绑定邀请码，所绑定邀请码为：" + C_Player.invitecode, 0, 0);
	}
}
GameUI.CloseBind = function() {
	set_group(80, 37, 0, 0, 0);
}

GameUI.addBroadcast = function(text) {
	if (Utl.isMainScene()) {
		GameData.BroadcastArray.push(text);
		if (!GameData.isBoardcast) {
			GameUI.playBroadcast();
		}
	}
}
GameUI.playBroadcast = function() {
	if (GameData.BroadcastArray.length > 0) {
		if (Utl.isMainScene()) {
			set_group(56, 37, 1, 0, 0);
			GameData.isBoardcast = true;
			var text = GameData.BroadcastArray.shift();
			var text_len = text.gblen() * ConstVal.Broadcast.textwidth;
			set_self(390, 7, text, 0, 0, 0);
			set_self(390, 18, ConstVal.Broadcast.clip_x + ConstVal.Broadcast.clip_w, 0, 0);
			play_ani(1, 390, 18, ConstVal.Broadcast.clip_x + ConstVal.Broadcast.clip_w, ConstVal.Broadcast.clip_x - text_len, 0, (text_len + get_self(389, 20, 0, 0, 0)) / ConstVal.Broadcast.speed, 0, 0, 0, 1, 0, 0);
		}
	} else {
		GameUI.closeBroadcast();
	}

}
GameUI.clearBroadcast = function() {
	GameData.BroadcastArray = [];
	play_ani(0, 390, 18);
	GameData.isBoardcast = false;
	set_group(56, 37, 0, 0, 0);
}
GameUI.closeBroadcast = function() {
	play_ani(0, 390, 18);
	GameData.isBoardcast = false;
	set_group(56, 37, 0, 0, 0);
}
GameUI.closeBroadcastfromplayer = function() {
	//GameUI.closeBroadcast();
	//GameUI.playBroadcast();
}

GameUI.showBackBtn = function() {
	if (GameData.LaunchMode == ConstVal.Launch_mode.from_hall) {
		set_self(465, 37, 1, 0, 0);
	} else {
		set_self(465, 37, 0, 0, 0);
	}
}
GameUI.openAuth = function() {
	set_group(57, 37, 1, 0, 0);
	set_self(491, 37, 0, 0, 0);
	set_self(492, 37, 0, 0, 0);
	set_self(489, 7, "", 0, 0);
	set_self(490, 7, "", 0, 0);
}
GameUI.closeAuth = function() {
	set_group(57, 37, 0, 0, 0);
}
GameUI.setLoginButton = function() {

	switch (GameData.loginBtnType) {
	case ConstVal.loginButton.type1[0]:
		set_self(3, 1, ConstVal.loginButton.type1[1], 0, 0, 0);
		break;
	case ConstVal.loginButton.type2[0]:
		set_self(3, 1, ConstVal.loginButton.type2[1], 0, 0, 0);
		break;
	}
}

GameUI.playTextVoice = function(_text) {
	for (var i = 0; i < Game_Config.Info.TextContent.length; i++) {
		if (Game_Config.Info.TextContent[i] == _text) {
			Func.play_wav(Game_Config.Info.TextContentMp3[i], 0);
		}
	}
}
//打开星星争霸场 
GameUI.openWorldRoom = function() {
	set_group(82, 37, 1, 0, 0);
	set_self(518, 43, GameData.nameImgFrame_2, 0, 0);
	if (GameData.worldRoomPage == 0) {
		GameUI.goWorldRoom1();
	} else {
		GameUI.goWorldRoom2();
	}

}
//前往系统房
GameUI.goWorldRoom1 = function() {
	GameData.worldRoomPage = 0;
	set_self(92, 43, 1, 0, 0);
	set_self(93, 43, 4, 0, 0);
	set_self(521, 37, 0, 0, 0);
	set_self(3019, 37, 0, 0, 0);
	//set_self(3019,37,0,0,0);
	GameUI.createWorldRoom1();
}
//前往自建房
GameUI.goWorldRoom2 = function() {
	GameData.worldRoomPage = 1;
	set_self(92, 43, 2, 0, 0);
	set_self(93, 43, 3, 0, 0);
	set_self(521, 37, 1, 0, 0);
	set_self(3019, 37, 1, 0, 0);
	GameUI.createWorldRoom2();
}
//关闭星星争霸场
GameUI.closeWorldRoom = function() {
	//GameData.worldRoomPage = 0;
	set_group(82, 37, 0, 0, 0);
	set_group(96, 37, 0, 0, 0);
	set_group(97, 37, 0, 0, 0);
	//GameUI.removeWorldRoom1();
	//GameUI.removeWorldRoom2();
	//GameData.worldRoomSys = [];
	//GameData.worldRoomPly = [];
}
//设置星星争霸场数据
GameUI.setWorldRoom = function(_pack) {
	if (_pack.roomlist_system) {
		GameData.worldRoomSys = _pack.roomlist_system;
		for (var i = 0; i < GameData.worldRoomSys.length; i++) {
			if (GameData.worldRoomSys[i].image) {
				Func.up_imgurl(ConstVal.worldRoom.imgList[i], GameData.worldRoomSys[i].image);
			}
		}
	} else {
		GameData.worldRoomSys = [];
	}

	if (_pack.roomlist_player) {
		GameData.worldRoomPly = _pack.roomlist_player;
		if (Game_Modify.getRoomMode) {

			for (var i = 0; i < GameData.worldRoomPly.length; i++) {
				var mode = Game_Modify.getRoomMode(GameData.worldRoomPly[i].roomtype);
				if (!mode) {
					GameData.worldRoomPly.splice(i, 1);
					i--;
				}
			}
		}
	} else {
		GameData.worldRoomPly = [];
	}
}
//人数显示转换
GameUI.convertPlayerCount = function(_pCount) {
	//_pCount = 101000;
	try {
		_pCount = Number(_pCount);
		if (_pCount > 9999) {
			return Math.ceil(_pCount / 10000) + "万+";
		} else {
			return _pCount;
		}
	} catch (e) {
		return _pCount;
	}
}
//创建星星争霸场相关精灵 
GameUI.createWorldRoom1 = function() {
	//set_self(518,43,GameData.nameImgFrame_2,0,0);
	//GameData.worldRoomSys.push(GameData.worldRoomSys[0]);
	GameUI.removeWorldRoom1();
	set_group(97, 37, 0, 0, 0);
	set_group(96, 37, 1, 0, 0);
	//set_self(ConstVal.worldRoom.f_sp_1,37,1,0,0);


	set_self(ConstVal.worldRoom.top_sp_1, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.des_sp_1, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.starbg_sp_1, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.star_sp_1, 41, 0, 0, 0);

	set_self(ConstVal.worldRoom.mult_sp_1, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.pCount_sp_1, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.join_sp_1, 41, 0, 0, 0);

	set_self(ConstVal.worldRoom.multIcon_sp, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.multImg_sp, 41, 0, 0, 0);

	set_self(ConstVal.worldRoom.f_sp_1, 18, ConstVal.worldRoom.clip_x_1, 0, 0);
	set_self(ConstVal.worldRoom.f_sp_1, 19, ConstVal.worldRoom.clip_y_1, 0, 0);
	var bg_width_1 = get_self(ConstVal.worldRoom.bg_sp_1, 20, 0, 0);
	var bg_height_1 = get_self(ConstVal.worldRoom.bg_sp_1, 21, 0, 0);
	var space_1 = ConstVal.worldRoom.bg_sp_space_1 + bg_width_1;

	if (GameData.worldRoomSys.length >= 2) {
		set_self(ConstVal.worldRoom.f_sp_1, 20, ConstVal.worldRoom.bgSpaceX * 2, 0);
	} else {
		set_self(ConstVal.worldRoom.f_sp_1, 20, ConstVal.worldRoom.bgSpaceX, 0);
	}
	set_self(ConstVal.worldRoom.f_sp_1, 21, ConstVal.worldRoom.bgSpaceY * Math.ceil(GameData.worldRoomSys.length / 2), 0);
	//set_self(ConstVal.worldRoom.f_sp_1,20,(bg_width_1+ConstVal.worldRoom.bg_sp_space_1)*GameData.worldRoomSys.length,0);
	//set_self(ConstVal.worldRoom.f_sp_1,21,bg_height_1,0);
	for (var i = 0; i < GameData.worldRoomSys.length; i++) { //系统房间 
		//大背景
		var bg_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.bg_sp_1, ConstVal.worldRoom.bg_sp_x_1 + (i % 2) * ConstVal.worldRoom.bgSpaceX, ConstVal.worldRoom.bg_sp_y_1 + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.bg_sp_tag_1);
		set_self(bg_id, 43, (i % 4) + 1, 0, 0);
		//顶栏描述
		//console.log("x:"+get_self(bg_id,18,0,0,0));GameData.worldRoomSys[i].image
		//console.log("y:"+get_self(bg_id,19,0,0,0));
		if (GameData.worldRoomSys[i].image) {
			var topImg = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.topImg_sp, 0, 
			ConstVal.worldRoom.topImg_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.topImg_tag);
			set_self(topImg, 1, ConstVal.worldRoom.imgList[i], 0, 0);
			set_self(topImg, 18, get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - get_self(topImg, 20, 0, 0, 0) / 2, 0, 0);
			set_self(topImg,41,0,0,0);

		} else {
			var top_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.top_sp_1, 0, 
			ConstVal.worldRoom.top_sp_y_1 + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.top_sp_tag_1);
			var top_info = GameData.worldRoomSys[i].title;
			//var top_info = "初级场";
			set_self(top_id, 7, top_info, 0, 0);
			set_self(top_id, 18, get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - top_info.gblen() * ConstVal.worldRoom.top_sp_width_1 / 2, 0, 0);
			set_self(top_id,41,0,0,0);
		}
		//if(GameData.worldRoomSys[i].title){
		//var top_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1,ConstVal.worldRoom.top_sp_1,
		//0,
		//ConstVal.worldRoom.top_sp_y_1+Math.floor(i/2)*ConstVal.worldRoom.bgSpaceY,i+ConstVal.worldRoom.top_sp_tag_1
		//);
		//var top_info = GameData.worldRoomSys[i].title;
		//set_self(top_id,7,top_info,0,0);
		//set_self(top_id,18,get_self(bg_id,18,0,0,0) + get_self(bg_id,20,0,0,0)/2-top_info.gblen()*ConstVal.worldRoom.top_sp_width_1/2,0,0);
		//}else{
		//var topImg = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1,ConstVal.worldRoom.topImg_sp,
		//0,
		//ConstVal.worldRoom.topImg_y+Math.floor(i/2)*ConstVal.worldRoom.bgSpaceY,i+ConstVal.worldRoom.topImg_tag
		//);
		//set_self(topImg,1,ConstVal.worldRoom.imgList[i],0,0);
		//set_self(topImg,18,get_self(bg_id,18,0,0,0) +get_self(bg_id,20,0,0,0)/2 - get_self(topImg,20,0,0,0)/2,0,0);
		//}


		var mTemp = Game_Modify.getMult(GameData.worldRoomSys[i].roomtype, 1);
		var mult_text = 0;
		mTemp <= 0 ? mult_text = 1 : mult_text = mTemp;

		//if(mTemp <= 0){
		//mult_text = GameData.worldRoomSys[i].title;
		//}else{
		//mult_text = GameData.worldRoomSys[i].title+"  "+mTemp+"倍";
		//}
		//var mult_x = get_self(ConstVal.worldRoom.bg_sp_1,20,0,0,0)/2 - mult_text.gblen()*ConstVal.worldRoom.mult_sp_w_1/2;
		//var mult_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1,ConstVal.worldRoom.mult_sp_1,
		//mult_x+(i%2)*ConstVal.worldRoom.bgSpaceX,
		//ConstVal.worldRoom.mult_sp_y_1+Math.floor(i/2)*ConstVal.worldRoom.bgSpaceY,i+ConstVal.worldRoom.mult_sp_tag_1
		//);
		//set_self(mult_id,7,mult_text,0,0);
		var mx = get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - (get_self(ConstVal.worldRoom.multIcon_sp, 20, 0, 0, 0) + String(mult_text).length * ConstVal.worldRoom.multImgWidth + ConstVal.worldRoom.multIconImgSpace) / 2;
		var multIcon = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.multIcon_sp, 
		get_self(bg_id, 18, 0, 0, 0) + get_self(bg_id, 20, 0, 0, 0) / 2 - get_self(ConstVal.worldRoom.multIcon_sp, 20, 0, 0, 0) / 2,
		 ConstVal.worldRoom.multIcon_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.multIcon_tag);
		var multImg = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.multImg_sp, 0, 
		ConstVal.worldRoom.multImg_y + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.multImg_tag);
		set_self(multImg, 7, mult_text, 0, 0);
		set_self(multImg, 20, String(mult_text).length * ConstVal.worldRoom.multImgWidth, 0, 0);
		set_self(multImg, 18, 25 + get_self(multIcon, 18, 0, 0, 0) + get_self(multIcon, 20, 0, 0, 0) / 2 - get_self(multImg, 20, 0, 0, 0) / 2, 0, 0);

		//房间信息描述 
		//var des_id =  ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1,ConstVal.worldRoom.des_sp_1,
		//ConstVal.worldRoom.des_sp_x_1+i*space_1,ConstVal.worldRoom.des_sp_y_1,i+ConstVal.worldRoom.des_sp_tag_1
		//);
		//var des_info = Game_Modify.getRoomInfo(GameData.worldRoomSys[i].roomtype,1);
		//set_self(des_id,7,des_info,0,0);
		//星星背景
		//var starbg_id =  ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1,ConstVal.worldRoom.starbg_sp_1,
		//ConstVal.worldRoom.starbg_sp_x_1+i*space_1,ConstVal.worldRoom.starbg_sp_y_1,i+ConstVal.worldRoom.starbg_sp_tag_1
		//);
		//set_self(starbg_id,18,ConstVal.worldRoom.bg_sp_x_1+i*space_1+bg_width_1/2-get_self(ConstVal.worldRoom.starbg_sp_1,20,0,0,0)/2,0,0);

		//星星背景
		//var star_id =  ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1,ConstVal.worldRoom.star_sp_1,
		//ConstVal.worldRoom.star_sp_x_1+i*space_1,ConstVal.worldRoom.star_sp_y_1,i+ConstVal.worldRoom.star_sp_tag_1
		//);
		//var star_info = "下限:"+Game_Modify.getStarLimit(GameData.worldRoomSys[i].roomtype);
		//set_self(star_id,7,star_info,0,0);
		//set_self(star_id,18,ConstVal.worldRoom.bg_sp_x_1+i*space_1+bg_width_1/2-star_info.gblen()*ConstVal.worldRoom.top_sp_width_1/2,0,0);
		//人数
		if (GameData.worldRoomSys[i].playercount) {
			var pCount_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.pCount_sp_1, ConstVal.worldRoom.pCount_sp_x_1 + (i % 2) * ConstVal.worldRoom.bgSpaceX, ConstVal.worldRoom.pCount_sp_y_1 + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.pCount_sp_tag_1);
			set_self(pCount_id, 7, GameUI.convertPlayerCount(GameData.worldRoomSys[i].playercount), 0, 0);
		}

		//准入
		var limit_text = String(Game_Modify.getStarLimit(GameData.worldRoomSys[i].roomtype));
		limit_text >= 100000 ? limit_text = Math.floor(limit_text / 10000) + "万" : true;
		//var limit_x = ConstVal.worldRoom.join_sp_x_1 - limit_text.gblen()*ConstVal.worldRoom.join_sp_w_1;
		var limit_x = ConstVal.worldRoom.join_sp_x_1;
		var limit_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_1, ConstVal.worldRoom.join_sp_1, limit_x + (i % 2) * ConstVal.worldRoom.bgSpaceX, ConstVal.worldRoom.join_sp_y_1 + Math.floor(i / 2) * ConstVal.worldRoom.bgSpaceY, i + ConstVal.worldRoom.join_sp_tag_1);
		set_self(limit_id, 7, limit_text, 0, 0);

	}


	//if(GameData.hallConfig.enableQuickEnter){//隐藏快速加入 
	//set_self(521,37,0,0,0);
	//set_self(3019,18,522,0,0);
	//}else{//不隐藏 
	//set_self(3019,18,766,0,0);
	//set_self(521,18,788,0,0);
	//}
}
GameUI.createWorldRoom2 = function() {
	GameUI.removeWorldRoom2();
	set_group(96, 37, 0, 0, 0);
	set_group(97, 37, 1, 0, 0);


	set_self(ConstVal.worldRoom.f_sp_2, 18, ConstVal.worldRoom.clip_x_2, 0, 0);
	set_self(ConstVal.worldRoom.f_sp_2, 19, ConstVal.worldRoom.clip_y_2, 0, 0);
	set_self(ConstVal.worldRoom.top_sp_2, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.des_sp_2, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.starbg_sp_2, 41, 0, 0, 0);
	set_self(ConstVal.worldRoom.star_sp_2, 41, 0, 0, 0);

	var bg_width_2 = get_self(ConstVal.worldRoom.bg_sp_2, 20, 0, 0);
	var bg_height_2 = get_self(ConstVal.worldRoom.bg_sp_2, 21, 0, 0);
	var space_2 = ConstVal.worldRoom.bg_sp_space_2 + bg_height_2;
	//ConstVal.worldRoom.clip_h_2 = 3*(ConstVal.worldRoom.bg_sp_space_2 + bg_height_2);
	set_self(ConstVal.worldRoom.f_sp_2, 20, bg_width_2, 0);
	set_self(ConstVal.worldRoom.f_sp_2, 21, (bg_height_2 + ConstVal.worldRoom.bg_sp_space_2) * GameData.worldRoomPly.length, 0);
	var listLength = GameData.worldRoomPly.length;
	var pCountTag = ConstVal.worldRoom.pCount_sp_tag_2;
	var pCountW = get_self(ConstVal.worldRoom.pCount_sp_2, 20, 0, 0, 0);
	var pCountX = get_self(ConstVal.worldRoom.pCountIcon_sp_2, 20, 0, 0, 0) + ConstVal.worldRoom.pCountIcon_pCount_space_2 + ConstVal.worldRoom.pCountIcon_sp_x_2;
	for (var i = 0; i < GameData.worldRoomPly.length; i++) { //玩家房间
		//大背景
		var bg_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.bg_sp_2, ConstVal.worldRoom.bg_sp_x_2, ConstVal.worldRoom.bg_sp_y_2 + i * space_2, i + ConstVal.worldRoom.bg_sp_tag_2);

		//倍数
		var mult_text = "倍数:";
		var mTemp = Game_Modify.getMult(GameData.worldRoomPly[i].roomtype, 2);
		if (mTemp <= 0) {
			mult_text += "1";
		} else {
			mult_text += mTemp;
		}
		//房间标题 
		var titleTxt = GameData.worldRoomPly[i].destwo;
		if (GameData.worldRoomPly[i].shareType) {
			if (!titleTxt) {
				titleTxt = "vip赛事";
			}
		} else {
			titleTxt = "普通房间";
		}
		var title_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.title_sp, ConstVal.worldRoom.title_sp_x, ConstVal.worldRoom.title_sp_y + i * space_2, i + ConstVal.worldRoom.title_tag);
		set_self(title_id, 7, titleTxt, 0, 0);
		var mult_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.mult_sp_2, ConstVal.worldRoom.mult_sp_x_2, ConstVal.worldRoom.mult_sp_y_2 + i * space_2, i + ConstVal.worldRoom.mult_sp_tag_2);
		set_self(mult_id, 7, mult_text, 0, 0);
		//房间信息描述
		var des_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.des_sp_2, ConstVal.worldRoom.des_sp_x_2, ConstVal.worldRoom.des_sp_y_2 + i * space_2, i + ConstVal.worldRoom.des_sp_tag_2);
		var des_info = Game_Modify.getRoomInfo(GameData.worldRoomPly[i].roomtype, 2, GameData.worldRoomPly[i].tea);
		des_info = min_replaceAll(des_info, "\n", "", false);
		//des_info = Func.subString(des_info,46,true);
		set_self(des_id, 7, des_info, 0, 0);
		//离场
		var leave_text = "离场:";
		var lTemp = Game_Modify.getLeaveLimit(GameData.worldRoomPly[i].roomtype);

		lTemp > 0 ? leave_text += lTemp : leave_text = "";
		var leaveX = ConstVal.worldRoom.leave_sp_x_2 - ConstVal.worldRoom.leave_sp_w_2 * leave_text.gblen();
		//入场
		var join_text = "入场:";
		var lTemp = Game_Modify.getStarLimit(GameData.worldRoomPly[i].roomtype);

		lTemp > 0 ? join_text += lTemp : join_text = "";
		var joinX = ConstVal.worldRoom.join_sp_x_2 - ConstVal.worldRoom.join_sp_w_2 * join_text.gblen();
		var limitX = 0;
		leaveX < joinX ? limitX = leaveX : limitX = joinX;
		var leave_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.leave_sp_2, limitX, ConstVal.worldRoom.leave_sp_y_2 + i * space_2, i + ConstVal.worldRoom.leave_sp_tag_2);
		set_self(leave_id, 7, leave_text, 0, 0);


		var join_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.join_sp_2, limitX, ConstVal.worldRoom.join_sp_y_2 + i * space_2, i + ConstVal.worldRoom.join_sp_tag_2);
		set_self(join_id, 7, join_text, 0, 0);
		//房间号
		var roomcode_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.roomCode_sp_2, ConstVal.worldRoom.roomCode_sp_x_2, ConstVal.worldRoom.roomCode_sp_y_2 + i * space_2, i + ConstVal.worldRoom.roomCode_sp_tag_2);
		set_self(roomcode_id, 20, String(GameData.worldRoomPly[i].roomcode).length * ConstVal.worldRoom.roomCode_sp_w_2, 0, 0);
		set_self(roomcode_id, 7, GameData.worldRoomPly[i].roomcode, 0, 0);
		if (GameData.worldRoomPly[i].seatcount) {
			//人数icon
			var pCountIcon_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.pCountIcon_sp_2, ConstVal.worldRoom.pCountIcon_sp_x_2, ConstVal.worldRoom.pCountIcon_sp_y_2 + i * space_2, i + ConstVal.worldRoom.pCountIcon_sp_tag_2);
			//人数显示
			for (j = 0; j < GameData.worldRoomPly[i].seatcount; j++) {

				var pCount_id = ifast_addtospritefromspritecopy(ConstVal.worldRoom.f_sp_2, ConstVal.worldRoom.pCount_sp_2, pCountX + j * (ConstVal.worldRoom.pCount_space_2 + pCountW), ConstVal.worldRoom.pCount_sp_y_2 + i * space_2, pCountTag);
				if (GameData.worldRoomPly[i].playercount - 1 >= j) {
					set_self(pCount_id, 43, 1, 0, 0, 0);
				} else {
					set_self(pCount_id, 43, 2, 0, 0, 0);
				}
				pCountTag++;
			}
		}
	}
}

//删除星星争霸场数据包括创建的精灵
GameUI.removeWorldRoom1 = function() {
	for (var i = 0; i < GameData.worldRoomSys.length; i++) { //系统房间
		//大背景
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.bg_sp_tag_1);
		//顶栏描述
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.top_sp_tag_1);
		//房间信息描述
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1,i+ConstVal.worldRoom.topImg_tag);
		//星星背景
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1,i+ConstVal.worldRoom.multIcon_tag);

		//
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1,i+ConstVal.worldRoom.multImg_tag);
		//倍数
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.mult_sp_tag_1);
		//人数
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.pCount_sp_tag_1);
		//准入
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_1, i + ConstVal.worldRoom.join_sp_tag_1);
	}
	return;
	var pCountTag = ConstVal.worldRoom.pCount_sp_tag_2;
	for (var i = 0; i < GameData.worldRoomPly.length; i++) { //玩家房间
		//大背景
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.bg_sp_tag_2);
		//顶栏描述
		//ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2,i+ConstVal.worldRoom.top_sp_tag_2);
		//房间信息描述
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.des_sp_tag_2);
		//星星背景
		//ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2,i+ConstVal.worldRoom.starbg_sp_tag_2);
		//星星背景
		//ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2,i+ConstVal.worldRoom.star_sp_tag_2);
		//倍数
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.mult_sp_tag_2);
		if (GameData.worldRoomPly[i].seatcount) {
			for (var j = 0; j < GameData.worldRoomPly[i].seatcount; j++) {
				//人数
				ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, pCountTag);
				pCountTag++;
			}
		}
		//准入
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.join_sp_tag_2);
		//人数icon
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.pCountIcon_sp_tag_2);
		//离场
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.leave_sp_tag_2);
		//房间号
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.roomCode_sp_tag_2);
	}
	//GameData.worldRoomSys=[];

}
//删除星星争霸场数据包括创建的精灵
GameUI.removeWorldRoom2 = function() {

	var pCountTag = ConstVal.worldRoom.pCount_sp_tag_2;
	for (var i = 0; i < GameData.worldRoomPly.length; i++) { //玩家房间
		//大背景
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.bg_sp_tag_2);
		//顶栏描述
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.title_tag);
		//房间信息描述
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.des_sp_tag_2);
		//星星背景
		//ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2,i+ConstVal.worldRoom.starbg_sp_tag_2);
		//星星背景
		//ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2,i+ConstVal.worldRoom.star_sp_tag_2);
		//倍数
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.mult_sp_tag_2);
		if (GameData.worldRoomPly[i].seatcount) {
			for (var j = 0; j < GameData.worldRoomPly[i].seatcount; j++) {
				//人数
				ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, pCountTag);
				pCountTag++;
			}
		}
		//准入
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.join_sp_tag_2);
		//人数icon
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.pCountIcon_sp_tag_2);
		//离场
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.leave_sp_tag_2);
		//房间号
		ifast_dllpritefromspritecopy(ConstVal.worldRoom.f_sp_2, i + ConstVal.worldRoom.roomCode_sp_tag_2);
	}
	//GameData.worldRoomPly=[];
}
GameUI.switchSnrVideo = function(bTemp) {
	if (bTemp) {
		set_self(3133, 43, 1, 0, 0);
	} else {
		set_self(3133, 43, 2, 0, 0);
	}
}
GameUI.updateCloseState = function() {
	if (GameData.snrRoomList.isClose == 0) {
		set_self(3136, 37, 0, 0, 0);
		set_self(3164, 43, 1, 0, 0);
	} else if (GameData.snrRoomList.isClose == 1) {
		set_self(3136, 37, 0, 0, 0);
		set_self(3164, 43, 2, 0, 0);
	} else {
		set_self(3163, 37, 0, 0, 0);
		set_self(3164, 37, 0, 0, 0);
	}
}
GameUI.clickSnrRoomState = function() {
	if (GameData.snrRoomList.isClose) {
		GameData.senRoomState = 0;
	} else {
		GameData.senRoomState = 1;
	}
	//GameUI.updateCloseState();
	var data = {};
	data.agentid = GameData.AgentId;
	data.gameid = GameData.GameId;
	data.playerid = C_Player.playerid;
	data.isClose = GameData.senRoomState;
	Net.Send_switchRoomList(data);
}
GameUI.clickSnrVideo = function() {
	if (GameData.sysConfig.videoConfig) {
		if (GameUI.Mem.snrOption.videoConfig) {
			GameUI.Mem.snrOption.videoConfig = null;
			GameUI.switchSnrVideo(false);
		} else {
			GameUI.Mem.snrOption.videoConfig = GameData.sysConfig.videoConfig;
			GameUI.switchSnrVideo(true);
		}
	}
}
GameUI.clickSnrFobid = function() {
	//if (GameData.sysConfig.videoConfig) {
		if (GameUI.Mem.snrOption.forbidSelect) {
			GameUI.Mem.snrOption.forbidSelect = 0;
			//GameUI.switchSnrForbid();
			GameUI.updateFobidSelect();
		} else {
			GameUI.Mem.snrOption.forbidSelect = 1;
			//GameUI.switchSnrForbid();
			GameUI.updateFobidSelect();
		}
	//}
}
GameUI.updateFobidSelect = function() {
	if(GameData.snrRoomList.roomlist.length == 0){
		set_self(3257, 37, 0, 0, 0);
		set_self(3258, 37, 0, 0, 0);
		return;
	}
	if (GameData.snrRoomList.forbidSelect == 0) {
		set_self(3257, 37, 1, 0, 0);
		set_self(3258, 37, 1, 0, 0);
		set_self(3258, 43, 2, 0, 0);
	} else if(GameData.snrRoomList.forbidSelect == 1){
		set_self(3257, 37, 1, 0, 0);
		set_self(3258, 37, 1, 0, 0);
		set_self(3258, 43, 1, 0, 0);
	}
}
GameUI.switchSnrForbid = function(){
	if(GameUI.Mem.snrOption.forbidSelect){
		set_self(3258,43,1,0,0);
	}else{
		set_self(3258,43,2,0,0);
	}
}
//打开高级选项
GameUI.openSeniorOptions = function(mode, roomtype, descrip, _profit) { //是否为星星场
	//console.log(Desk);
	var _mode = 0;
	//mode = 1;
	GameData.snrOption = {
		profit: 0,
		roomcode: "",
	};
	var limit = Game_Modify.getStarLimit(roomtype);
	var mult = Game_Modify.getMult(roomtype, 0);
	GameUI.Mem.snrOption.infinite = 0;
	GameUI.Mem.snrOption.max = 9999999;
	//GameUI.Mem.snrOption.max = Number(GameData.hallConfig.max)*mult;
	GameUI.Mem.snrOption.min = 0;
	GameUI.Mem.snrOption.sysRebate = parseInt(mult * GameData.sysConfig.rebateConfig.value / 100);
	//if(GameData.snrRoomList.forbidSelect){
		//GameUI.Mem.snrOption.forbidSelect = 1;
	//}else{
		//GameUI.Mem.snrOption.forbidSelect = 0;
	//}
	
	if (Game_Config.sysConfig.vipInfinite) {
		GameUI.Mem.snrOption.sysRebate = 0;
	}
	if(!Game_Modify.getRoomMode(roomtype)){
		GameUI.Mem.snrOption.sysRebate = 0;
	}
	//GameUI.Mem.snrOption.min = parseInt(mult * GameData.sysConfig.rebateConfig.value / 100);
	//GameUI.Mem.snrOption.unit = Number(GameData.hallConfig.unit) * mult;
	//GameUI.Mem.snrOption.max == 0 ? _mode = 1 : _mode = 0;
	//set_self(599,7,"玩家可通过输入短号快速加入房间",0);
	//set_self(3015,7,"更改已存在房间，房间类型会在牌局结束或者房间解散后更新",0);
	//set_self(3101,7,"是否为无限局",0);
	set_self(628, 7, descrip, 0, 0);
	GameData.snrOption.profit < GameUI.Mem.snrOption.min ? GameData.snrOption.profit = GameUI.Mem.snrOption.min : (GameData.snrOption.profit > GameUI.Mem.snrOption.max ? GameData.snrOption.profit = GameUI.Mem.snrOption.max : true);
	GameUI.Mem.snrOption.slider = get_self(597, 20, 0, 0, 0);
	GameUI.Mem.snrOption.start_x = get_self(596, 18, 0, 0, 0);
	GameUI.Mem.snrOption.end_x = get_self(596, 20, 0, 0, 0) + GameUI.Mem.snrOption.start_x - GameUI.Mem.snrOption.slider;
	GameUI.Mem.snrOption.unit_px = (get_self(596, 20, 0, 0, 0) - GameUI.Mem.snrOption.slider) / ((GameUI.Mem.snrOption.max - GameUI.Mem.snrOption.min) / GameUI.Mem.snrOption.unit);
	GameUI.Mem.snrOption.count = Math.round((GameUI.Mem.snrOption.end_x - GameUI.Mem.snrOption.start_x) / GameUI.Mem.snrOption.unit_px);
	//set_self(597,18,GameUI.Mem.snrOption.start_x+((GameData.snrOption.profit - GameUI.Mem.snrOption.min)/GameUI.Mem.snrOption.unit)*GameUI.Mem.snrOption.unit_px,0,0);

	//set_self(593,20,GameUI.Mem.snrOption.number_1*String(GameData.snrOption.profit).length,0,0);
	//set_self(593,7,GameData.snrOption.profit,0,0);
	//set_self(593,18,get_self(597,18,0,0,0)+35-GameUI.Mem.snrOption.number_1*String(GameData.snrOption.profit).length/2,0,0);

	//set_self(594,20,GameUI.Mem.snrOption.number_2*String(GameUI.Mem.snrOption.min).length,0,0);
	//set_self(594,7,GameUI.Mem.snrOption.min,0,0);	
	//set_self(594,18,GameUI.Mem.snrOption.start_x - get_self(594,20,0,0,0) -10,0,0);

	//set_self(595,20,GameUI.Mem.snrOption.number_2*String(GameUI.Mem.snrOption.max).length,0,0);
	//set_self(595,7,GameUI.Mem.snrOption.max,0,0);
	var shortcode = "";
	if (GameData.snrRoomList.shortcode) {
		shortcode = GameData.snrRoomList.shortcode;
	}
	set_self(598, 20, GameUI.Mem.snrOption.number_1 * String(shortcode).length, 0, 0);
	set_self(598, 7, shortcode, 0, 0);
	//GameUI.Mem.snrOption.roomcode_string = String(GameData.snrOption.roomcode);
	//GameUI.Mem.snrOption.roomcode_number = Number(GameData.snrOption.roomcode);



	//GameUI.Mem.snrOption.number = GameData.snrOption.profit;

	set_group(83, 37, 1, 0, 0);
	GameUI.clearSnrOptionRoomList();
	GameUI.createSnrOptionRoomList();
	//set_self(610,37,0,0,0);
	if (GameData.sysConfig.videoConfig) {
		//GameUI.Mem.snrOption.videoConfig = GameData.sysConfig.videoConfig;
		GameUI.Mem.snrOption.videoConfig = null;
		GameUI.switchSnrVideo(false);
		set_self(3133, 41, 2, 0, 0);
		var vConfig = Logic.alyVideoConfig(GameData.sysConfig.videoConfig);
		set_self(3134, 7, "将收取" + vConfig[0] + ":" + vConfig[1]);

	} else {
		GameUI.Mem.snrOption.videoConfig = null;
		//不可点
		//GameUI.switchSnrVideo(false);
		//set_self(3133,41,0,0,0);
		//set_self(3134,7,"此功能暂未开放",0,0);

		//隐藏
		set_self(592, 37, 0, 0, 0);
		set_self(3133, 37, 0, 0, 0);
		set_self(3134, 37, 0, 0, 0);
	}
	
	//GameUI.switchSnrForbid();
	//if(mode){
	set_self(3100, 37, 0, 0, 0);
	set_self(3132, 37, 0, 0, 0);
	//}
	if (_mode) { //隐藏输入 
		//set_self(580,37,0,0,0);//短号费说明文字 
		set_self(593, 37, 0, 0, 0);
		set_self(594, 37, 0, 0, 0);
		set_self(596, 37, 0, 0, 0);
		set_self(597, 37, 0, 0, 0);
		set_self(595, 37, 0, 0, 0);

		//set_self(3097,37,0,0,0);//输入底框 
		set_self(3098, 37, 0, 0, 0); //说明文字 
		set_self(3099, 37, 0, 0, 0); //输入数字
		set_self(3097, 41, 0, 0, 0);
	} else {
		set_self(3130, 37, 0, 0, 0);

		//if(_profit){
		//GameUI.Mem.snrOption.number = _profit;
		//GameUI.setNumberImage(3099,_profit,28);
		//GameUI.adaptPositionX(3099,get_self(3097,18,0,0,0)+get_self(3097,20,0,0,0)/2);
		//}else{
		//GameUI.Mem.snrOption.number = GameUI.Mem.snrOption.min;
		//	try{
		//	limit = Number(limit);
		//	mult = Number(mult);	
		//}catch(e){
		//	limit = 0;
		//	mult = 0;
		//}
		//if(limit > 0 && mult > 0){
		set_self(3158, 37, 0, 0, 0);
		set_self(3197, 41, 1, 0, 0);
		//set_self(3098, 7, "(" + GameUI.Mem.snrOption.min + "~" + GameUI.Mem.snrOption.max + ")");
		
		
		//var value = GameUI.Mem.snrOption.tea;
		var value = 0;
		if (!value) {
			if (GameUI.Mem.snrOption.tea) {
				value = GameUI.Mem.snrOption.tea;
			} else {
				value = 0;
				GameUI.Mem.snrOption.tea = 0;
			}
		}
		var vl = Number(value);
		if (Number(value) < GameUI.Mem.snrOption.min) {
			vl = GameUI.Mem.snrOption.min;
		} else {
			if (Number(value) > GameUI.Mem.snrOption.max) {
				vl = GameUI.Mem.snrOption.max;
			}
		}
		GameUI.Mem.snrOption.number = vl;
		GameUI.setNumberImage(3099, vl, 18);
		GameUI.adaptPositionX(3099, get_self(3097, 18, 0, 0, 0) + get_self(3097, 20, 0, 0, 0) / 2);
		var rCount = vl + GameUI.Mem.snrOption.sysRebate;
		set_self(3098, 7, "系统收取: "+GameUI.Mem.snrOption.sysRebate+"\n您加收: "+vl+"\n合计: "+rCount);
		//	}else{
		//	set_self(3099,37,0,0,0);
		//	set_self(3098,37,0,0,0);
		//	set_self(3158,37,1,0,0);
		//}
		//}
	}
	var val = Utl.ReadData(Utl.Config.rebateLimit);
	set_self(3239,7,"低于免收值将不收取房间费",0,0);
	GameUI.setNumberImage(3237, val, 18);
	GameUI.adaptPositionSpid(3237,3236);
	console.log(GameData.rebateConfig);
	if(GameData.rebateConfig){
		if(GameData.rebateConfig.from == 3 && Game_Modify.getRoomMode(roomtype)){
			set_self(3238,37,0,0,0);
			set_self(3236,37,0,0,0);
			set_self(3237,37,0,0,0);
			set_self(3239,37,0,0,0);
		}
	}
	//金币场 
	//if(mode){

	//}else{

	//}
	//百人 
	if (Game_Config.sysConfig.vipInfinite) {
		set_self(653, 37, 0, 0, 0);
	}
	if (!GameData.sysConfig.managerUrl) {
		set_self(3140, 37, 0, 0, 0);
	}
	set_self(3089, 18, 464, 0, 0, 0);
	
/*
	if(Game_Config.sysConfig.vipInfinite){
	set_self(3130,37,0,0,0);
	set_self(3099,37,0,0,0);
	set_self(3097,37,0,0,0);
	set_self(580,37,0,0,0);
	set_self(3158,37,0,0,0);
	var txt = Logic.getRebateDes(mult);
	set_self(3098,7,"系统每小局对每个玩家收取"+GameData.starName+":"+txt);
	set_self(3098,18,186,0,0,0);
	set_self(3098,37,1,0,0);		
	}
	*/
	set_self(3166, 37, 0, 0, 0);
	//set_self(3167,37,0,0,0);
	//set_self(3168,37,0,0,0);
	set_self(3169, 37, 0, 0, 0);
	set_self(3168, 7, GameData.starName, 0, 0);
	set_self(3169, 7, GameData.sysConfig.charmName, 0, 0);
	//GameUI.Mem.snrOption.rebateType = 0;
	var isBean = 0;
	if (Game_Modify.getRoomMode) {
		isBean = Game_Modify.getRoomMode(GameData.snrOptionRoomtype);
	}
	var cTemp = true;
	//if(!Game_Config.sysConfig.vipInfinite){
	if (!isBean) {
		if (GameData.rebateConfig) {
			if (GameData.rebateConfig.rebateCharm) {
				set_self(3166, 37, 1, 0, 0);
				//set_self(3167,37,1,0,0);
				//set_self(3168,37,1,0,0);
				set_self(3169, 37, 1, 0, 0);
				cTemp = false;
			}
		}
	}
	//}
	if (cTemp) {
		GameUI.Mem.snrOption.rebateType = 0;
	}
	if (Game_Config.sysConfig.vipInfinite && GameData.brNumber) {
		set_self(3134, 37, 1, 0, 0);
		set_self(3134, 18, 190, 0, 0);
		if(GameData.brRebateUnit){
			if(GameData.brRebateUnit >= 10000){
				var txt = "每小局将收取您" + GameData.starName + ":" + GameData.brNumber;	
			}else{
				var txt = "每小局每"+GameData.brRebateUnit+"人收取您" + GameData.starName + ":" + GameData.brNumber;	
			}
		}else{
			var txt = "每小局将收取您" + GameData.starName + ":" + GameData.brNumber;
		}
		set_self(3134, 7, txt, 0, 0);
	}
	GameUI.updateCloseState();
	GameUI.updateFobidSelect();

}

var snrInputCallback = function(value) {
		Utl.closeInputPanel();
		var vl = Number(value);
		if (Number(value) < GameUI.Mem.snrOption.min) {
			GameUI.OpenTips("输入低于最小，已变更为最小值", ConstVal.Tips.time);
			vl = GameUI.Mem.snrOption.min;
		} else {
			if (Number(value) > GameUI.Mem.snrOption.max) {
				GameUI.OpenTips("输入高于最大，已变更为最大值", ConstVal.Tips.time);
				vl = GameUI.Mem.snrOption.max;
			}
		}
		GameUI.Mem.snrOption.number = vl;
		Logic.saveTea(vl);
		GameUI.Mem.snrOption.tea = vl;
		GameUI.setNumberImage(3099, vl, 18);
		GameUI.adaptPositionX(3099, get_self(3097, 18, 0, 0, 0) + get_self(3097, 20, 0, 0, 0) / 2);
		var rCount = vl + GameUI.Mem.snrOption.sysRebate;
		set_self(3098, 7, "系统收取: "+GameUI.Mem.snrOption.sysRebate+"\n您加收: "+vl+"\n合计: "+rCount);
	}
	//关闭高级选项
	GameUI.closeSeniorOptions = function() {
		//if(GameUI.Mem.snrOption.roomcode_string.length !=6 && GameUI.Mem.snrOption.roomcode_string.length != 0){
		//GameUI.OpenTips("房间号必须为6位或为空！");
		//return;
		//}
		//GameData.snrOption.profit = GameUI.Mem.snrOption.number;
		//GameData.snrOption.roomcode = GameUI.Mem.snrOption.roomcode_string;
		set_group(83, 37, 0, 0, 0);
		if (Game_Modify.onCloseVip) {
			Game_Modify.onCloseVip();
		}


	}
	//高级选项mouseup事件
	GameUI.seniorOptionsSlideEnd = function(gameid, spid_down, downx, downy, spid_up, upx, upy, timelong, no1, no2) {
		var position = get_self(597, 18, 0, 0, 0) - GameUI.Mem.snrOption.start_x;
		var new_position = GameUI.Mem.snrOption.start_x + Math.round(position / GameUI.Mem.snrOption.unit_px) * GameUI.Mem.snrOption.unit_px;
		if (new_position < GameUI.Mem.snrOption.start_x) {
			new_position = GameUI.Mem.snrOption.start_x;
		}
		if (new_position > GameUI.Mem.snrOption.end_x) {
			new_position = GameUI.Mem.snrOption.end_x;
		}
		new_position < GameUI.Mem.snrOption.start_x ? new_position = GameUI.Mem.snrOption.start_x : (new_position > GameUI.Mem.snrOption.end_x ? new_position = GameUI.Mem.snrOption.end_x : true);

		set_self(597, 18, new_position, 0, 0);
		set_self(593, 18, get_self(597, 18, 0, 0, 0) + 35 - get_self(593, 20, 0, 0, 0) / 2, 0, 0);

	}
	//高级选项滑动
	GameUI.seniorOptionsSlide = function(gameid, spid, downx, downy, movex, movey, timelong, offmovex, offmovey, no1) {
		var position = get_self(spid, 18, 0, 0, 0) + offmovex;
		if (position >= GameUI.Mem.snrOption.start_x && position <= GameUI.Mem.snrOption.end_x) {
			//if(position+offmovex){
			set_self(spid, 18, offmovex, 1, 0);
			var count = Math.round((get_self(597, 18, 0, 0, 0) - GameUI.Mem.snrOption.start_x) / GameUI.Mem.snrOption.unit_px);
			count < 0 ? count = 0 : (count > GameUI.Mem.snrOption.count ? count = GameUI.Mem.snrOption.count : true);
			var _value = Number(count * GameUI.Mem.snrOption.unit) + Number(GameUI.Mem.snrOption.min);
			GameUI.Mem.snrOption.number = _value;
			_value > GameUI.Mem.snrOption.max ? _value = GameUI.Mem.snrOption.max : true;
			set_self(593, 20, String(_value).length * GameUI.Mem.snrOption.number_1, 0, 0);
			set_self(593, 7, _value, 0, 0);
			set_self(593, 18, get_self(597, 18, 0, 0, 0) + 35 - String(_value).length * GameUI.Mem.snrOption.number_1 / 2, 0, 0);
			//}
		}
	}
	//创建高级选项房间列表
	GameUI.createSnrOptionRoomList = function() {
		var roomInfo = "";
		var tea = 0;
		if (GameData.snrRoomList.roomtype) {
			roomInfo = Game_Modify.getFullRoomInfo(GameData.snrRoomList.roomtype);
		}
		if (GameData.snrRoomList.tea) {
			tea = GameData.snrRoomList.tea;
		}
		var bg_width = get_self(ConstVal.snrRoomList.bg_spid, 20, 0, 0);
		var bg_height = get_self(ConstVal.snrRoomList.bg_spid, 21, 0, 0);
		var space = bg_height + ConstVal.snrRoomList.bg_space;
		set_self(ConstVal.snrRoomList.f_spid, 18, ConstVal.snrRoomList.clip_x, 0, 0);
		set_self(ConstVal.snrRoomList.f_spid, 19, ConstVal.snrRoomList.clip_y, 0, 0);
		//set_self(ConstVal.snrRoomList.f_spid,20,GameData.snrRoomList.roomlist.length*space,0,0);
		//set_self(ConstVal.snrRoomList.f_spid,21,ConstVal.snrRoomList.clip_h,0,0);


		set_self(ConstVal.snrRoomList.f_spid, 20, ConstVal.snrRoomList.clip_w, 0, 0);
		set_self(ConstVal.snrRoomList.f_spid, 21, GameData.snrRoomList.roomlist.length * space, 0, 0);

		for (var i = 0; i < GameData.snrRoomList.roomlist.length; i++) {
			//背景 
			var bg = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.bg_spid, ConstVal.snrRoomList.bg_x, ConstVal.snrRoomList.bg_y + i * space, i + ConstVal.snrRoomList.bg_tag);


			//房号
			var rcode = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_spid, ConstVal.snrRoomList.rcode_x, ConstVal.snrRoomList.rcode_y + i * space, i + ConstVal.snrRoomList.rcode_tag);
			//set_self(rcode,20,String(GameData.snrRoomList.roomlist[i]).length*GameUI.Mem.snrOption.number_4,0,0);
			//set_self(rcode,18,ConstVal.snrRoomList.bg_x + i*space+(get_self(bg,20,0,0) - get_self(rcode,20,0,0))/2,0,0);
			set_self(rcode, 20, String(GameData.snrRoomList.roomlist[i]).length * GameUI.Mem.snrOption.number_4, 0, 0);
			set_self(rcode, 7, GameData.snrRoomList.roomlist[i], 0, 0);
			//关闭按钮
			//var closeBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.close_spid,
			//ConstVal.snrRoomList.close_x + i*space,ConstVal.snrRoomList.close_y,i+ConstVal.snrRoomList.close_tag);
			//修改按钮
			//var updateBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.update_spid,
			//ConstVal.snrRoomList.update_x + i*space,ConstVal.snrRoomList.update_y,i+ConstVal.snrRoomList.update_tag);
			//开关按钮
			//var switchBtn = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.switch_spid,
			//ConstVal.snrRoomList.switch_x + i*space,ConstVal.snrRoomList.switch_y,i+ConstVal.snrRoomList.switch_tag);
			//if(GameData.snrRoomList[i].state == 0){//开启中
			//set_self(switchBtn,43,2,0,0);
			//}else{
			//set_self(switchBtn,43,3,0,0);
			//}
			//房间信息描述 
			var info = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.info_spid, ConstVal.snrRoomList.info_x, ConstVal.snrRoomList.info_y + i * space, i + ConstVal.snrRoomList.info_tag);
			var infoText = roomInfo;
			set_self(info, 7, infoText, 0, 0, 0);

			//	抽成背景 
			//var rcode_bg = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid,ConstVal.snrRoomList.rcode_bg_spid,
			//ConstVal.snrRoomList.rcode_bg_x + i*space,ConstVal.snrRoomList.rcode_bg_y,i+ConstVal.snrRoomList.rcode_bg_tag);
			//茶水费 
			var profit = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.profit_spid, ConstVal.snrRoomList.profit_x, ConstVal.snrRoomList.profit_y + i * space, i + ConstVal.snrRoomList.profit_tag);
			var profigText = "房费:" + tea;
			
			
			if (!GameData.snrRoomList.rebateType) {
				profigText += GameData.starName;
			} else {
				profigText += GameData.sysConfig.charmName;
			}
			if(GameData.snrRoomList.rebateLimit){
				profigText += " 免收:"+GameData.snrRoomList.rebateLimit;
			}
			set_self(profit, 7, profigText, 0, 0);
			//set_self(profit,18,get_self(bg,18,0,0,0)+get_self(bg,20,0,0,0)/2-profigText.gblen()*ConstVal.snrRoomList.profit_w/2,0,0);
			//视频房标志
			if (GameData.snrRoomList.videoConfig) {
				var info = ifast_addtospritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.video_spid, ConstVal.snrRoomList.video_x, ConstVal.snrRoomList.video_y + i * space, i + ConstVal.snrRoomList.video_tag);
			}
		}
		GameData.snrOptionLength = GameData.snrRoomList.roomlist.length;
	}
	//清除高级选项房间列表
	GameUI.clearSnrOptionRoomList = function() {
		for (var i = 0; i < GameData.snrOptionLength; i++) {
			//背景
			ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.bg_tag + i);
			//房号 
			ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_tag + i);
			//房间信息描述
			ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.info_tag + i);
			//关闭按钮 
			ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.close_tag + i);
			//抽成背景
			ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.rcode_bg_tag + i);
			//抽成
			ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.profit_tag + i);
			//视频房标志 
			ifast_dllpritefromspritecopy(ConstVal.snrRoomList.f_spid, ConstVal.snrRoomList.video_tag + i);
		}
		GameData.snrOptionLength = 0;
	}
	//根据值更新滑动块位置
	GameUI.updateSnrSlider = function(value) {
		set_self(597, 18, GameUI.Mem.snrOption.start_x + ((GameData.snrOption.max - GameUI.Mem.snrOption.min) / value) * GameUI.Mem.snrOption.slider, 0, 0);
	}
	//更新高级选项界面
	GameUI.updateSnrOption = function() {
		GameData.snrOption.profit < GameUI.Mem.snrOption.min ? GameData.snrOption.profit = GameUI.Mem.snrOption.min : (GameData.snrOption.profit > GameUI.Mem.snrOption.max ? GameData.snrOption.profit = GameUI.Mem.snrOption.max : true);
		GameUI.Mem.snrOption.slider = get_self(597, 20, 0, 0, 0);
		GameUI.Mem.snrOption.start_x = get_self(596, 18, 0, 0, 0);
		GameUI.Mem.snrOption.end_x = get_self(596, 20, 0, 0, 0) + GameUI.Mem.snrOption.start_x - GameUI.Mem.snrOption.slider;
		GameUI.Mem.snrOption.unit_px = (get_self(596, 20, 0, 0, 0) - GameUI.Mem.snrOption.slider) / ((GameUI.Mem.snrOption.max - GameUI.Mem.snrOption.min) / GameUI.Mem.snrOption.unit);
		GameUI.Mem.snrOption.count = Math.round((GameUI.Mem.snrOption.end_x - GameUI.Mem.snrOption.start_x) / GameUI.Mem.snrOption.unit_px);
		set_self(597, 18, GameUI.Mem.snrOption.start_x + ((GameData.snrOption.profit - GameUI.Mem.snrOption.min) / GameUI.Mem.snrOption.unit) * GameUI.Mem.snrOption.unit_px, 0, 0);

		set_self(593, 20, GameUI.Mem.snrOption.number_1 * String(GameData.snrOption.profit).length, 0, 0);
		set_self(593, 7, GameData.snrOption.profit, 0, 0);

		set_self(594, 20, GameUI.Mem.snrOption.number_2 * String(GameUI.Mem.snrOption.min).length, 0, 0);
		set_self(594, 7, GameUI.Mem.snrOption.min, 0, 0);
		set_self(594, 18, GameUI.Mem.snrOption.start_x - get_self(594, 20, 0, 0, 0) - 10, 0, 0);

		set_self(595, 20, GameUI.Mem.snrOption.number_2 * String(GameUI.Mem.snrOption.max).length, 0, 0);
		set_self(595, 7, GameUI.Mem.snrOption.max, 0, 0);


		GameUI.Mem.snrOption.roomcode_string = String(GameData.snrOption.roomcode);
		//GameUI.Mem.snrOption.roomcode_number = Number(GameData.snrOption.roomcode);



		GameUI.Mem.snrOption.number = GameData.snrOption.profit;
	}
	//打开排行榜
	GameUI.openRankList = function(temp) {
		GameData.rankType = temp;
		if(GameData.rankType){
			set_self(3234,43,1,0,0);
		}else{
			set_self(3234,43,2,0,0);	
		}
		GameUI.closePallet();
		if (GameData.rankList.length == 0) {
			return;
		} else {
			GameData.rankListTag = 0;
		}
		set_self(639, 43, GameData.nameImgFrame_2, 0, 0);
		for (var i = 0; i < GameData.rankList.length; i++) {
			Func.up_imgurl(ConstVal.rankList.headsrc + i, GameData.rankList[i].headimg);
		}
		if(!GameData.rankType){
			if (GameData.ownerNote && GameData.hallConfig.isReSetOwnerNote) {
				GameData.rankList[0].signature = GameData.ownerNote;
			}
		}
		if (GameData.rankList[GameData.rankListTag].signature) {
			set_self(641, 7, "个性签名:\n"+GameData.rankList[GameData.rankListTag].signature,0,0);
			//set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0);
		} else {
			set_self(641, 7, "个性签名:");
			//set_self(640, 7, "", 0, 0);
		}
		if(GameData.rankType){
			var rText = "公告:\n";
			if (GameData.rankList[GameData.rankListTag].destwo){
				rText += "("+GameData.rankList[GameData.rankListTag].destwo+")\n";
			}
			if(GameData.rankList[GameData.rankListTag].notice){
				rText += GameData.rankList[GameData.rankListTag].notice
			}
			set_self(640, 7,rText,0,0);
			/*
			if (GameData.rankList[GameData.rankListTag].destwo) {
				set_self(640, 7, "公告:\n\n("+GameData.rankList[GameData.rankListTag].destwo+")\n"+GameData.rankList[GameData.rankListTag].notice,0,0);
				//set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0);
			} else {
				set_self(640, 7, "公告:",0,0);
				//set_self(640, 7, "", 0, 0);
			}*/
			
		}else{
			set_self(640, 7, "",0,0);
		}

		set_self(634, 1, ConstVal.rankList.headsrc + GameData.rankListTag, 0, 0);
		set_self(636, 7, GameData.rankList[GameData.rankListTag].name, 0, 0);
		set_self(637, 7, "ID:" + GameData.rankList[GameData.rankListTag].playerid, 0, 0);
		set_self(638, 7, GameData.rankList[GameData.rankListTag].star, 0, 0);

		set_group(84, 37, 1, 0, 0);

		GameUI.createRankList();
	}
	//关闭排行榜
	GameUI.closeRankList = function() {
		set_group(84, 37, 0, 0, 0);
	}
	//创建排行榜
	GameUI.createRankList = function() {
		GameUI.removeRankList();
		set_self(ConstVal.rankList.f_spid, 19, ConstVal.rankList.clip_y, 0, 0);
		var rankLengthTemp = GameData.rankList.length;
		var space = get_self(ConstVal.rankList.bg_spid, 21, 0, 0, 0) + ConstVal.rankList.space;
		set_self(ConstVal.rankList.f_spid, 21, space * rankLengthTemp, 0, 0);
		for (var i = 0; i < rankLengthTemp; i++) {
			//背景
			var bg = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.bg_spid, ConstVal.rankList.bg_x, ConstVal.rankList.bg_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.bg_tag);
			switch (i) {
			case 0:
				//徽章 
				var badge = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.badge_spid, ConstVal.rankList.badge_x, ConstVal.rankList.badge_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.badge_tag);
				set_self(badge, 43, 1, 0, 0, 0);
				break;
			case 1:
				//徽章
				var badge = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.badge_spid, ConstVal.rankList.badge_x, ConstVal.rankList.badge_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.badge_tag);
				set_self(badge, 43, 2, 0, 0, 0);
				break;
			case 2:
				//徽章
				var badge = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.badge_spid, ConstVal.rankList.badge_x, ConstVal.rankList.badge_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.badge_tag);
				set_self(badge, 43, 3, 0, 0, 0);
				break;
			default:
				break;
			}
			//头像 
			var headimg = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headimg_spid, ConstVal.rankList.headimg_x, ConstVal.rankList.headimg_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.headimg_tag);
			set_self(headimg, 1, ConstVal.rankList.headsrc + i, 0, 0);
			//头像框 
			var headfront = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headfront_spid, ConstVal.rankList.headfront_x, ConstVal.rankList.headfront_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.headfront_tag);
			//昵称 
			var name = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.name_spid, ConstVal.rankList.name_x, ConstVal.rankList.name_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.name_tag);
			//星星数
			if(!GameData.rankType){
				set_self(name, 7, GameData.rankList[i].name, 0, 0, 0);
			}else{
				set_self(name, 7, "VIP房号："+GameData.rankList[i].shortcode, 0, 0, 0);
			}
			var star = ifast_addtospritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.star_spid, ConstVal.rankList.star_x, ConstVal.rankList.star_y + i * space + ConstVal.rankList.space, i + ConstVal.rankList.star_tag);
			//if(!GameData.rankType){
				set_self(star, 7, GameData.starName + ":" + GameData.rankList[i].star, 0, 0, 0);
			//}else{
			//	var dtxt =  "公告:" + GameData.rankList[i].destwo;
			//	set_self(star, 7,Func.subString(dtxt,20,true), 0, 0, 0);
			//}
		}
		GameData.ranListLength = rankLengthTemp;
		set_self(ConstVal.rankList.f_spid, 20, get_self(ConstVal.rankList.bg_spid, 20, 0, 0), 0, 0);

	}
	//删除排行榜
	GameUI.removeRankList = function() {
		for (var i = 0; i < GameData.ranListLength; i++) {
			//背景
			ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.bg_tag + i);
			//徽章 
			ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.badge_tag + i);
			//头像
			ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headimg_tag + i);
			//头像框
			ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.headfront_tag + i);
			//昵称
			ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.name_tag + i);
			//星星 
			ifast_dllpritefromspritecopy(ConstVal.rankList.f_spid, ConstVal.rankList.star_tag + i);
		}
		GameData.ranListLength = 0;
	}
	//点击排行榜
	GameUI.clickRankList = function(tag) {
		GameData.rankListTag = tag;
		set_self(634, 1, ConstVal.rankList.headsrc + GameData.rankListTag, 0, 0);
		set_self(636, 7, GameData.rankList[GameData.rankListTag].name, 0, 0);
		set_self(637, 7, "ID:" + GameData.rankList[GameData.rankListTag].playerid, 0, 0);
		set_self(638, 7, GameData.rankList[GameData.rankListTag].star, 0, 0);
		/*if (GameData.rankList[GameData.rankListTag].signature) {
			set_self(641,7,"个性签名:");
			set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0);
		} else {
			set_self(641,7,"");
			set_self(640, 7, "", 0, 0);
		}*/
		if (GameData.rankList[GameData.rankListTag].signature) {
			set_self(641, 7, "个性签名:\n"+GameData.rankList[GameData.rankListTag].signature,0,0);
			//set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0);
		} else {
			set_self(641, 7, "个性签名:");
			//set_self(640, 7, "", 0, 0);
		}
		if(GameData.rankType){
			var rText = "公告:\n";
			if (GameData.rankList[GameData.rankListTag].destwo){
				rText += "("+GameData.rankList[GameData.rankListTag].destwo+")\n";
			}
			if(GameData.rankList[GameData.rankListTag].notice){
				rText += GameData.rankList[GameData.rankListTag].notice
			}
			set_self(640, 7, rText,0,0);
			/*
			if (GameData.rankList[GameData.rankListTag].destwo) {
				set_self(640, 7, "公告:\n\n("+GameData.rankList[GameData.rankListTag].destwo+")\n"+GameData.rankList[GameData.rankListTag].notice,0,0);
				//set_self(640, 7, GameData.rankList[GameData.rankListTag].signature, 0, 0);
			} else {
				set_self(640, 7, "公告:",0,0);
				//set_self(640, 7, "", 0, 0);
			}*/
		}else{
			set_self(640, 7, "",0,0);
		}
	}
	//打开分享引导
	GameUI.openShareImg = function() {
		set_group(85, 37, 1, 0, 0);
	}
	//关闭分享引导
	GameUI.closeShareImg = function() {
		set_group(85, 37, 0, 0, 0);
	}
GameUI.SetImg = function(base64) {
	set_group(86, 37, 1, 0, 0);
	//var div_game = window.document.getElementById("div_game");
	var dH = window.innerHeight * ConstVal.screenShotParam;
	var dW = window.innerWidth * ConstVal.screenShotParam;
	if (dH > dW) {
		var dh = dH;
		dH = dW;
		dW = dh;
	}

	var div_result = window.document.getElementById("div_result");
	//div_result.style.transform = 'rotate(90deg)';
	//div_result.style.transformOrigin = '0 0 0';
	div_result.style.display = "block";
	// div_result.setAttribute("class", "div_result_show_css");
	div_result.className = "div_result_show_css";
	div_result.style.width = dW + "px";
	div_result.style.height = dH + "px";
	//div_result.style.width = dH + "px";
	//div_result.style.height = dW + "px";

	//var topNum = parseInt((dH - dW)/2);
	//div_result.style.top = topNum + "px";
	//div_result.style.left = "0px";

	var div_img = document.getElementById("div_img");
	//div_img.style.width = (dW - 8) + "px";
	//div_img.style.height = (dW - 8 ) + "px";
	div_img.style.width = dW + "px";
	div_img.style.height = dH + "px";
	//div_img.style.width = dH + "px";
	//div_img.style.height = dW + "px";

	var div_text = document.getElementById("div_text");
	div_text.style.width = dW + "px";
	div_text.style.height = "30px";
	div_text.style.top = div_img.style.height + "px";
	div_img.style.height = (parseInt(dH * 0.7) - 48) + "px";
	//div_img.style.height = (parseInt(dW * 0.7) - 48) + "px";

	var obj = document.getElementById("img1");
	obj.setAttribute("src", base64); //把图片修改为目标路径
	obj.style.width = dW + "px";
	obj.style.height = dH + "px";
	//obj.style.width = dH + "px";
	//obj.style.height = dW + "px";


}

GameUI.HideImg = function() {
	var div_result = window.document.getElementById("div_result");
	div_result.style.display = "none";
	set_group(86, 37, 0, 0, 0);
}
GameUI.screenShot = function(spidList) {
	//if(yyy==1){return;}
	//yyy=1;
	//var canvas1 = document.createElement("canvas");
	//canvas1.width=1280;
	//canvas1.height=720;
	//var g=canvas1.getContext("2d");
	//g.drawImage(iui.canvas,0,0,canvas1.width,canvas1.height);
	//var dataurl=canvas1.toDataURL("image/jpeg",0.7);
	//GameUI.SetImg(dataurl);

	//GameData.screenShotStage=1;
	if (spidList) {
		GameData.screenShotSpidList = spidList;
	} else {
		spidList = [];
	}

	for (var i = 0; i < GameData.screenShotSpidList.length; i++) {
		set_self(GameData.screenShotSpidList[i], 37, 0, 0, 0);
	}
	for (var i = 0; i < 10; i++) {
		set_self(376 + i, 37, 0, 0, 0);
	}
	var w, h;
	w = iui.backBuffer.width;
	h = iui.backBuffer.height;

	//	iui.backBuffer=null;

	iui.backBuffer.height = 0;
	iui.backBuffer.width = 0;
	iui.backBuffer = null;
	iui.backBuffer = document.createElement('canvas');
	iui.backBufferContext2D = iui.backBuffer.getContext('2d');
	gameabc_face.dc = iui.backBufferContext2D;
	iui.backBuffer.width = w;
	iui.backBuffer.height = h;
	GameData.screenShotStage = 1;



}
GameUI.gameenddraw = function(gameid, spid, times, timelong) {
	//更新完成代码

	switch (GameData.screenShotStage) {
	case 1:
		//console.log("screenShotStage");
		GameData.screenShotStage = 0;
		var imageData = iui.backBuffer.toDataURL("image/jpeg", ConstVal.screenShotParam);
		for (var i = 0; i < GameData.screenShotSpidList.length; i++) {
			set_self(GameData.screenShotSpidList[i], 37, 1, 0, 0);
		}
		GameUI.SetImg(imageData);

		GameData.screenShotSpidList = [];
		break;
	}

};
GameUI.adaptWidthNumber = function(spid, text, width) {
	set_self(spid, 20, String(text).length * width, 0, 0);
}
GameUI.adaptPositionX = function(spid, adpX) {
	set_self(spid, 18, adpX - get_self(spid, 20, 0, 0, 0) / 2, 0, 0);
}
GameUI.adaptPositionSpid = function(spid, adpSpid) {
	set_self(spid, 18, get_self(adpSpid, 18, 0, 0, 0) + get_self(adpSpid, 20, 0, 0, 0) / 2 - get_self(spid, 20, 0, 0, 0) / 2, 0, 0);
}
GameUI.setNumberImage = function(spid, text, width) {
	set_self(spid, 7, text, 0, 0);
	set_self(spid, 20, String(text).length * width, 0, 0);
}
//打开数字输入面板 
GameUI.openInputPanel = function(_msg, _callback,begin0) {
	if (_callback) {
		GameData.inputCallBack = _callback;
	}
	if(begin0){
		GameData.begin0 = true;
	}else{
		GameData.begin0 = false;
	}
	if(GameData.begin0){
		GameData.inputPanelData = "";
	}else{
		GameData.inputPanelData = "0";
	}
	set_self(3001, 7, _msg, 0, 0);
	set_self(3001, 20, String(_msg).gblen() * 26, 0, 0);
	GameUI.adaptPositionSpid(3001, 659);
	GameUI.setNumberImage(3003, GameData.inputPanelData, 51);
	GameUI.adaptPositionSpid(3003, 3002);
	set_group(87, 37, 1, 0, 0);
}
//关闭数字输入面板

GameUI.closeInputPanel = function() {
	set_group(87, 37, 0, 0, 0);
}
GameUI.inputPanel = function(spid) {
	if (spid >= 661 && spid <= 670) { //数字输入
		if (GameData.inputPanelData.length > 17) {
			GameUI.OpenTips("输入超出范围", ConstVal.Tips.time);
			return;
		}
		if(!GameData.begin0){
			if (GameData.inputPanelData == "0") { //
				GameData.inputPanelData = String(spid - 661);
				GameUI.setNumberImage(3003, GameData.inputPanelData, 51);
				GameUI.adaptPositionSpid(3003, 3002);
			} else {
				GameData.inputPanelData += String(spid - 661);
				GameUI.setNumberImage(3003, GameData.inputPanelData, 51);
				GameUI.adaptPositionSpid(3003, 3002);
			}
		}else{
			GameData.inputPanelData += String(spid - 661);
			GameUI.setNumberImage(3003, GameData.inputPanelData, 51);
			GameUI.adaptPositionSpid(3003, 3002);
		}
	}
	if (spid == 671) { //删除 
		if (GameData.inputPanelData.length == 1) {
			if(GameData.begin0){
				GameData.inputPanelData = "";
			}else{
				GameData.inputPanelData = "0";	
			}
		} else {
			GameData.inputPanelData = GameData.inputPanelData.substring(0, GameData.inputPanelData.length - 1);
		}
		GameUI.setNumberImage(3003, GameData.inputPanelData, 51);
		GameUI.adaptPositionSpid(3003, 3002);
	}
	if (spid == 3000) { //确定 
		//console.log(Number(GameData.inputPanelData));
		//GameUI.closeInputPanel();
		if(GameData.begin0){
			Game_Modify.onCheckInput(GameData.inputPanelData);	
		}else{
			Game_Modify.onCheckInput(Number(GameData.inputPanelData));	
		}
		if(GameData.begin0){
			if (GameData.inputCallBack) {
				GameData.inputCallBack(GameData.inputPanelData);
			}
		}else{
			if (GameData.inputCallBack) {
				GameData.inputCallBack(Number(GameData.inputPanelData));
			}
		}	
			

	}
}
GameUI.showNeighbor = function() {
	set_group(88, 37, 1, 0, 0);
}
GameUI.hideNeighbor = function() {
	set_group(88, 37, 0, 0, 0);
}


GameUI.updateInsertHTML = function() {
	//Logic.getHTML();
	return;
	//if(!GameData.hallConfig.activity){		
	//return;
	//}
	if (GameData.htmlId) {
		if (get_self(4, 37, 0, 0, 0) == 1) {
			var dom = document.getElementById(GameData.htmlId);
			if (dom) {
				dom.style.display = "block";
			}
		} else {
			var dom = document.getElementById(GameData.htmlId);
			if (dom) {
				dom.style.display = "none";
			}

		}

	}
}
GameUI.openTips2 = function(_msg, time) {
	try {
		//if(GameData.tipTimer2){
		//	GameData.tipTimer2 = null;
		//	clearTimeout(GameData.tipTimer2);
		//}
		if (time) {
			if (time > 0) {
				GameData.tipTimer2 = setTimeout("GameUI.closeTips2()", time);
			}
		}
		var gbLength = 14;
		var gbHeight = 28;
		var spaceX = 40;
		var spaceY = 25;
		var strArray = _msg.split("\n");
		var max_length = 0;
		for (var k = 0; k < strArray.length; k++) {
			var lenTemp = strArray[k].gblen();
			if (lenTemp > max_length) {
				max_length = lenTemp;
			}
		}
		set_self(3013, 7, _msg, 0, 0);

		set_self(3012, 20, max_length * gbLength + 2 * spaceX, 0, 0);
		set_self(3012, 21, strArray.length * gbHeight + 2 * spaceY, 0, 0);
		set_self(3012, 18, 640 - get_self(3012, 20, 0, 0, 0) / 2, 0, 0);
		set_self(3012, 19, 360 - get_self(3012, 21, 0, 0, 0) / 2, 0, 0);

		set_self(3013, 18, get_self(3012, 18, 0, 0, 0) + spaceX, 0, 0);
		set_self(3013, 19, get_self(3012, 19, 0, 0, 0) + spaceY, 0, 0);
		set_group(89, 37, 1, 0, 0);
	} catch (e) {

	}
}
GameUI.closeTips2 = function() {
	//if(GameData.tipTimer2){
	//	GameData.tipTimer2 = null;
	//	clearTimeout(GameData.tipTimer2);
	//}
	set_group(89, 37, 0, 0, 0);
}
//更新常驻活动按钮
GameUI.updateActBtn = function() {
	if (ConstVal.isGameHall) {
		set_self(3018, 37, 0, 0, 0);
		return;
	}
	if (isArray(GameData.hallConfig.actData)) {
		if (GameData.hallConfig.actData[0]) {
			Func.up_imgurl(253, GameData.hallConfig.actData[0]);
		}
		set_self(3018, 37, 1, 0, 0);
	} else {
		set_self(3018, 37, 0, 0, 0);
	}
}
//打开保险箱
GameUI.openWareHouse = function() {
	GameData.wareHouse.safeInputCount = -1, //保险箱存入取出数量
	GameData.wareHouse.safePassWord = -1, //保险箱存入取出密码
	GameData.wareHouse.inputNumber = 0, //输入的数字
	GameUI.closePallet();
	var bTemp = C_Player.bankpwd;
	set_group(91, 37, 1, 0, 0);
	set_self(3031, 37, 0, 0, 0);
	GameData.wareHouse.page = 1;
	GameUI.showWareHouseTable();
	set_self(3077, 43, Utl.getNameImgFrame_2(), 0, 0);
	set_self(3032, 43, Utl.getNameImgFrame_2(), 0, 0);
	set_self(3078, 43, Utl.getNameImgFrame_1(), 0, 0);
	if (bTemp) { //已绑定 
		switch (GameData.hallConfig.wareHouse) {
		case 2:
			GameData.wareHouse.selectType = 5;
			GameData.wareHouse.page = 2;
			break;
		case 1:
		case 3:
		case 4:
		case 5:
			GameData.wareHouse.selectType = 3;
			GameData.wareHouse.page = 1;
			break;
		}
		//GameData.wareHouse.selectType = 3;
		GameUI.selectWareHouseInputType(GameData.wareHouse.selectType);
		GameUI.updateWareHouseCheckBox();
		GameUI.updateWareHouseInput();
	} else { //未绑定 
		GameData.wareHouse.selectType = 1;
		set_group(93, 37, 1, 0, 0);
		GameUI.updateWareHouseInput();
		GameUI.selectWareHouseInputType(GameData.wareHouse.selectType);
	}
}
GameUI.closeWareHouse = function() {
	set_group(91, 37, 0, 0, 0);
	set_group(92, 37, 0, 0, 0);
	set_group(93, 37, 0, 0, 0);
	set_group(94, 37, 0, 0, 0);
}
//显示仓库标签页
GameUI.showWareHouseTable = function() {
	switch (GameData.hallConfig.wareHouse) {
	case 0:
		set_self(3059, 37, 0, 0, 0);
		set_self(3060, 37, 0, 0, 0);
		set_self(3061, 37, 0, 0, 0);
		set_self(3062, 37, 0, 0, 0);
		break;
	case 1:
	case 2:
		set_self(3059, 37, 1, 0, 0);
		set_self(3060, 37, 0, 0, 0);
		set_self(3061, 37, 1, 0, 0);
		set_self(3062, 37, 0, 0, 0);
		break;

	case 3:
	case 4:
	case 5:
		GameUI.switchWareHousePage(GameData.wareHouse.page);
		set_self(3059, 37, 1, 0, 0);
		set_self(3060, 37, 1, 0, 0);
		set_self(3061, 37, 1, 0, 0);
		set_self(3062, 37, 1, 0, 0);
		set_self(3081,1,170,0,0);
		set_self(3082,7,'',0,0);
		set_self(3083,7,'',0,0);
		break;
	}
	switch (GameData.wareHouse.page) {
	case 1:
		//保险箱

		set_self(3059, 43, 1, 0, 0);
		set_self(3060, 43, 2, 0, 0);
		set_self(3061, 43, 1, 0, 0);
		set_self(3062, 43, 4, 0, 0);
		break;
	case 2:
		//仓库

		set_self(3059, 43, 2, 0, 0);
		set_self(3060, 43, 1, 0, 0);
		set_self(3061, 43, 2, 0, 0);
		set_self(3062, 43, 3, 0, 0);

		break;
	}
}
//显示初始化密码界面
GameUI.showInitPassWord = function() {
	set_group(93, 37, 1, 0, 0);
}
//切换仓库页
GameUI.switchWareHousePage = function(page, bTemp) {
	var bTemp = C_Player.bankpwd;
	GameData.wareHouse.page = page;
	switch (page) {
	case 1:
		//保险箱 
		//set_self(3059,18,ConstVal.wareHouse.tableBgX[1],0,0);
		//set_self(3060,18,ConstVal.wareHouse.tableBgX[0],0,0);
		//set_self(3061,18,ConstVal.wareHouse.tableTextX[1],0,0);
		//set_self(3062,18,ConstVal.wareHouse.tableTextX[0],0,0);

		set_self(3059, 43, 1, 0, 0);
		set_self(3060, 43, 2, 0, 0);
		set_self(3061, 43, 1, 0, 0);
		set_self(3062, 43, 4, 0, 0);
		if (bTemp) {
			GameData.wareHouse.selectType = 3;
			//GameUI.updateWareHouseInput();
		} else {
			GameData.wareHouse.selectType = 1;
			GameUI.showInitPassWord();
		}
		GameUI.updateWareHouseInput(bTemp);
		GameUI.selectWareHouseInputType(GameData.wareHouse.selectType);
		break;
	case 2:
		//仓库 
		//set_self(3059,18,ConstVal.wareHouse.tableBgX[0],0,0);
		//set_self(3060,18,ConstVal.wareHouse.tableBgX[1],0,0);
		//set_self(3061,18,ConstVal.wareHouse.tableTextX[0],0,0);
		//set_self(3062,18,ConstVal.wareHouse.tableTextX[1],0,0);
		GameUI.updateWareHousePlayerInfo();
		set_self(3059, 43, 2, 0, 0);
		set_self(3060, 43, 1, 0, 0);
		set_self(3061, 43, 2, 0, 0);
		set_self(3062, 43, 3, 0, 0);
		if (bTemp) {
			GameData.wareHouse.selectType = 5;
			//GameUI.updateWareHouseInput();
		} else {
			GameUI.showInitPassWord();

		}
		GameUI.updateWareHouseInput(bTemp);
		GameUI.selectWareHouseInputType(GameData.wareHouse.selectType);
		break;
	}
	GameUI.updateWareHouseCheckBox();
}
//初始化赠送数据
GameUI.initGiveData = function(){
	GameData.wareHouse.pNickName = '';
	GameData.wareHouse.pId='';
	GameData.wareHouse.pImg='';
	GameData.wareHouse.pInputPassWord='';
	GameData.wareHouse.pInputCount = -1;
	GameData.wareHouse.pInputId = -1;
} 
//更新输入框内容
GameUI.updateWareHouseInput = function() {
	//var bTemp = C_Player.bankpwd;
	GameUI.updateCount();
	switch (GameData.wareHouse.selectType) {
	case 1:
		//初始化密码 
	case 2:
		set_group(93, 37, 1, 0, 0);
		set_group(94, 37, 0, 0, 0);
		set_group(92, 37, 0, 0, 0);
		if (GameData.wareHouse.initPassWord1 == GameData.wareHouse.initPassWord2) {
			if (GameData.wareHouse.initPassWord1 != -1 && String(GameData.wareHouse.initPassWord1).length != 0) {
				set_self(3073, 7, "输入符合规则！");
			} else {
				set_self(3073, 7, "密码不能为空！");
				set_self(3069, 37, 1, 0, 0);
			}
		} else {
			if (GameData.wareHouse.selectType == 1) {
				set_self(3073, 7, "输入密码.....");
			} else {
				if (GameData.wareHouse.initPassWord2 != -1 || String(GameData.wareHouse.initPassWord2).length == 0) {
					set_self(3073, 7, "两次输入不一致！");
				} else {
					set_self(3073, 7, "请再次输入密码.....");
				}

			}


		}
		if (GameData.wareHouse.initPassWord2 == -1 || String(GameData.wareHouse.initPassWord2).length == 0) {
			set_self(3072, 37, 0, 0, 0);
			set_self(3070, 37, 1, 0, 0);
		} else {
			set_self(3072, 37, 1, 0, 0);
			set_self(3070, 37, 0, 0, 0);
			GameUI.setNumberImage(3072, GameData.wareHouse.initPassWord2, 27);
		}
		if (GameData.wareHouse.initPassWord1 == -1 || String(GameData.wareHouse.initPassWord1).length == 0) {
			set_self(3071, 37, 0, 0, 0);
			set_self(3069, 37, 1, 0, 0);
		} else {
			set_self(3071, 37, 1, 0, 0);
			set_self(3069, 37, 0, 0, 0);
			GameUI.setNumberImage(3071, GameData.wareHouse.initPassWord1, 27);
		}
		break;
		//case 2://初始化密码二次输入 

		//break;
	case 3:
		//保险箱数量 
		//set_group(93,37,0,0,0);
		//break;
	case 4:
		//保险箱密码 
		set_group(94, 37, 0, 0, 0);
		set_group(93, 37, 0, 0, 0);
		set_group(92, 37, 1, 0, 0);
		if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 0) {
			set_self(3056, 37, 0, 0, 0);
			set_self(3040, 37, 1, 0, 0);

		} else {
			set_self(3056, 37, 1, 0, 0);
			set_self(3040, 37, 0, 0, 0);
			GameUI.setNumberImage(3056, GameData.wareHouse.safeInputCount, 27);
		}
		if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) {
			set_self(3058, 37, 0, 0, 0);
			set_self(3041, 37, 1, 0, 0);
		} else {
			set_self(3058, 37, 1, 0, 0);
			set_self(3041, 37, 0, 0, 0);
			GameUI.setNumberImage(3058, GameData.wareHouse.safePassWord, 27);
		}
		break;
	case 5:
		//玩家id
	case 6:
		//赠送数量
	case 7:
		//密码 
		set_group(93, 37, 0, 0, 0);
		set_group(92, 37, 0, 0, 0);
		set_group(94, 37, 1, 0, 0);
		if (GameData.hallConfig.wareHouse == 3) {
			set_self(3076, 37, 0, 0, 0);
			set_self(3078, 37, 0, 0, 0);
			set_self(3080, 37, 0, 0, 0);
		} else if (GameData.hallConfig.wareHouse == 4) {
			set_self(3075, 37, 0, 0, 0);
			set_self(3077, 37, 0, 0, 0);
			set_self(3079, 37, 0, 0, 0);
		}
		if (GameData.wareHouse.pInputId == -1 || String(GameData.wareHouse.pInputId).length == 0) {
			set_self(3093, 37, 0, 0, 0);
			set_self(3090, 37, 1, 0, 0);
			//GameUI.setNumberImage(3079,0,27);
		} else {
			set_self(3093, 37, 1, 0, 0);
			set_self(3090, 37, 0, 0, 0);
			GameUI.setNumberImage(3093, GameData.wareHouse.pInputId, 27);
			//GameUI.setNumberImage(3079,GameData.wareHouse.pInputId,27);
		}
		if (GameData.wareHouse.pInputCount == -1 || String(GameData.wareHouse.pInputCount).length == 0) {
			set_self(3094, 37, 0, 0, 0);
			set_self(3091, 37, 1, 0, 0);
		} else {
			set_self(3094, 37, 1, 0, 0);
			set_self(3091, 37, 0, 0, 0);
			GameUI.setNumberImage(3094, GameData.wareHouse.pInputCount, 27);
		}
		if (GameData.wareHouse.pInputPassWord == -1 || String(GameData.wareHouse.pInputPassWord).length == 0) {
			set_self(3095, 37, 0, 0, 0);
			set_self(3092, 37, 1, 0, 0);
		} else {
			set_self(3095, 37, 1, 0, 0);
			set_self(3092, 37, 0, 0, 0);
			GameUI.setNumberImage(3095, GameData.wareHouse.pInputPassWord, 27);
		}
		break;
	}
}
//更新输入框内容
GameUI.wareHouseInputNumber = function(type, _input) {
	switch (GameData.wareHouse.selectType) {
	case 1:
		//
		switch (type) {
		case 1:
			if (GameData.wareHouse.initPassWord1 == -1) {
				GameData.wareHouse.initPassWord1 = _input;
			} else if (String(GameData.wareHouse.initPassWord1).length >= ConstVal.wareHouse.passWordLength) {
				GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位！", ConstVal.Tips.time);
			} else {
				GameData.wareHouse.initPassWord1 = String(GameData.wareHouse.initPassWord1) + _input;
			}
			GameUI.updateWareHouseInput();
			break;
		case 2:
			if (GameData.wareHouse.initPassWord1 == -1 || String(GameData.wareHouse.initPassWord1).length == 0) {
				GameData.wareHouse.initPassWord1 = -1;
			} else {
				GameData.wareHouse.initPassWord1 = String(GameData.wareHouse.initPassWord1).substring(0, String(GameData.wareHouse.initPassWord1).length - 1);
			}
			GameUI.updateWareHouseInput();
			break;
		case 3:
			GameData.wareHouse.initPassWord1 = -1;
			GameUI.updateWareHouseInput();
			break;
		}
		break;
	case 2:
		//
		switch (type) {
		case 1:
			if (GameData.wareHouse.initPassWord2 == -1) {
				GameData.wareHouse.initPassWord2 = _input;
			} else if (String(GameData.wareHouse.initPassWord2).length >= ConstVal.wareHouse.passWordLength) {
				GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位！", ConstVal.Tips.time);
			} else {
				GameData.wareHouse.initPassWord2 = String(GameData.wareHouse.initPassWord2) + _input;
			}
			GameUI.updateWareHouseInput();
			break;
		case 2:
			if (GameData.wareHouse.initPassWord2 == -1 || String(GameData.wareHouse.initPassWord2).length == 0) {
				GameData.wareHouse.initPassWord2 = -1;
			} else {
				GameData.wareHouse.initPassWord2 = String(GameData.wareHouse.initPassWord2).substring(0, String(GameData.wareHouse.initPassWord2).length - 1);
			}
			GameUI.updateWareHouseInput();
			break;
		case 3:
			GameData.wareHouse.initPassWord2 = -1;
			GameUI.updateWareHouseInput();
			break;
		}
		break;

	case 3:
		//取出存入数量 
		switch (type) {
		case 1:
			if (GameData.wareHouse.safeInputCount == -1) {
				if (_input != 0) {
					//if(GameUI.checkWareHouseInput(_input,GameData.wareHouse.pInputType,GameData.wareHouse.safeInputType)[0]){
					//	GameData.wareHouse.safeInputCount = _input;
					//}
					var result = GameUI.checkWareHouseInput(_input, 2, GameData.wareHouse.safeInputType);
					if (result[0]) {
						GameData.wareHouse.safeInputCount = _input;
					} else {
						GameData.wareHouse.safeInputCount = result[1];
						GameUI.OpenTips("输入超出范围！已调整为最大值", ConstVal.Tips.time);
					}
					//GameData.wareHouse.safeInputCount = _input;
				}
			} else {
				var cTemp = Number(String(GameData.wareHouse.safeInputCount) + _input);
				//if(GameUI.checkWareHouseInput(cTemp,GameData.wareHouse.pInputType,GameData.wareHouse.safeInputType)[0]){
				//	GameData.wareHouse.safeInputCount = cTemp;
				//	}
				var result = GameUI.checkWareHouseInput(cTemp, 2, GameData.wareHouse.safeInputType);
				if (result[0]) {
					GameData.wareHouse.safeInputCount = cTemp;


				} else {
					GameData.wareHouse.safeInputCount = result[1];
					GameUI.OpenTips("输入超出范围！已调整为最大值", ConstVal.Tips.time);
				}
			}
			GameUI.updateWareHouseInput();
			break;
		case 2:
			if (GameData.wareHouse.safeInputCount == -1 || String(GameData.wareHouse.safeInputCount).length == 1) {
				GameData.wareHouse.safeInputCount = -1;
			} else {
				//if(String(GameData.wareHouse.safeInputCount).length == 1){
				//GameData.wareHouse.safeInputCount = -1;
				//}else{
				GameData.wareHouse.safeInputCount = Number(String(GameData.wareHouse.safeInputCount).substring(0, String(GameData.wareHouse.safeInputCount).length - 1));
				//}

			}
			GameUI.updateWareHouseInput();
			break;
		case 3:
			GameData.wareHouse.safeInputCount = -1;
			GameUI.updateWareHouseInput();
			break;
		}
		break;
	case 4:
		//
		switch (type) {
		case 1:
			if (GameData.wareHouse.safePassWord == -1) {
				GameData.wareHouse.safePassWord = _input;
			} else if (String(GameData.wareHouse.safePassWord).length >= ConstVal.wareHouse.passWordLength) {
				GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位！", ConstVal.Tips.time);
			} else {
				GameData.wareHouse.safePassWord = String(GameData.wareHouse.safePassWord) + _input;
			}
			GameUI.updateWareHouseInput();
			break;
		case 2:
			if (GameData.wareHouse.safePassWord == -1 || String(GameData.wareHouse.safePassWord).length == 0) {
				GameData.wareHouse.safePassWord = -1;
			} else {
				GameData.wareHouse.safePassWord = String(GameData.wareHouse.safePassWord).substring(0, String(GameData.wareHouse.safePassWord).length - 1);
			}
			GameUI.updateWareHouseInput();
			break;
		case 3:
			GameData.wareHouse.safePassWord = -1;
			GameUI.updateWareHouseInput();
			break;
		}
		break;
	case 5:
		//id
		switch (type) {
		case 1:
			
			if (GameData.wareHouse.pInputId == -1) {
				GameData.wareHouse.pInputId = _input;
			} else if (String(GameData.wareHouse.pInputId).length >= 6) {
				GameUI.OpenTips("玩家id长度为6位！", ConstVal.Tips.time);
			} else {
				GameData.wareHouse.pInputId = String(GameData.wareHouse.pInputId) + _input;
			}
			GameUI.updateWareHouseInput();
			break;
		case 2:
			if (GameData.wareHouse.pInputId == -1 || String(GameData.wareHouse.pInputId).length == 0) {
				GameData.wareHouse.pInputId = -1;
			} else {
				GameData.wareHouse.pInputId = String(GameData.wareHouse.pInputId).substring(0, String(GameData.wareHouse.pInputId).length - 1);
			}
			GameUI.updateWareHouseInput();
			break;
		case 3:
			GameData.wareHouse.pInputId = -1;
			GameUI.updateWareHouseInput();
			break;
		}
		break;
	case 6:
		switch (type) {
		case 1:
			if (GameData.wareHouse.pInputCount == -1) {
				if (_input != 0) {
					//GameData.wareHouse.pInputCount = _input;
					if (GameUI.checkWareHouseInput(_input, GameData.wareHouse.pInputType, 1)[0]) {
						GameData.wareHouse.pInputCount = _input;
					}
				}

			} else {
				var cTemp = Number(String(GameData.wareHouse.pInputCount) + _input);
				//验证输入星星合法性
				if(String(cTemp).length> 10){
					GameUI.OpenTips("输入超出限制！",ConstVal.Tips.time);
				}else{
					GameData.wareHouse.pInputCount = cTemp;	
				}
				//if (GameUI.checkWareHouseInput(cTemp, GameData.wareHouse.pInputType, 1)[0]) {
				//	GameData.wareHouse.pInputCount = cTemp;
				//}
			}
			GameUI.updateWareHouseInput();
			break;
		case 2:
			if (GameData.wareHouse.pInputCount == -1 || String(GameData.wareHouse.pInputCount).length == 1) {
				GameData.wareHouse.pInputCount = -1;
			} else {
				if(String(GameData.wareHouse.pInputCount).length > 10){
					GameUI.OpenTips("输入超出限制！",ConstVal.Tips.time);
				}else{
					GameData.wareHouse.pInputCount = Number(String(GameData.wareHouse.pInputCount).substring(0, String(GameData.wareHouse.pInputCount).length - 1));
				}

			}
			GameUI.updateWareHouseInput();
			break;
		case 3:
			GameData.wareHouse.pInputCount = -1;
			GameUI.updateWareHouseInput();
			break;
		}
		break;
	case 7:
		//
		switch (type) {
		case 1:
			if (GameData.wareHouse.pInputPassWord == -1) {
				GameData.wareHouse.pInputPassWord = _input;
			} else if (String(GameData.wareHouse.pInputPassWord).length >= ConstVal.wareHouse.passWordLength) {
				GameUI.OpenTips("密码长度为" + ConstVal.wareHouse.passWordLength + "位！", ConstVal.Tips.time);
			} else {
				GameData.wareHouse.pInputPassWord = String(GameData.wareHouse.pInputPassWord) + _input;
			}
			GameUI.updateWareHouseInput();
			break;
		case 2:
			if (GameData.wareHouse.pInputPassWord == -1 || String(GameData.wareHouse.pInputPassWord).length == 0) {
				GameData.wareHouse.pInputPassWord = -1;
			} else {
				GameData.wareHouse.pInputPassWord = String(GameData.wareHouse.pInputPassWord).substring(0, String(GameData.wareHouse.pInputPassWord).length - 1);
			}
			GameUI.updateWareHouseInput();
			break;
		case 3:
			GameData.wareHouse.pInputPassWord = -1;
			GameUI.updateWareHouseInput();
			break;
		}
		break;
	}
}
//点击保险箱存入取出 
GameUI.updateWareHouseCheckBox = function() {
	switch (GameData.wareHouse.page) {
	case 1:
		//第一页 
		switch (GameData.wareHouse.safeInputType) {
		case 1:
			set_self(3034, 43, 2, 0, 0);
			set_self(3035, 43, 1, 0, 0);
			var r = GameUI.checkWareHouseInput(GameData.wareHouse.safeInputCount, 1, GameData.wareHouse.safeInputType);
			if (!r[0]) {
				GameData.wareHouse.safeInputCount = r[1];
				GameUI.OpenTips("输入超出,已调整为最大！", ConstVal.Tips.time);
				GameUI.updateWareHouseInput();
			}
			break;
		case 2:
			set_self(3035, 43, 2, 0, 0);
			set_self(3034, 43, 1, 0, 0);
			var r = GameUI.checkWareHouseInput(GameData.wareHouse.safeInputCount, 2, GameData.wareHouse.safeInputType);
			if (!r[0]) {
				GameData.wareHouse.safeInputCount = r[1];
				GameUI.OpenTips("输入超出,已调整为最大！", ConstVal.Tips.time);
				GameUI.updateWareHouseInput();
			}
			break;
		}
		break;
	case 2:
		//第二页 
		switch (GameData.wareHouse.pInputType) {
		case 1:
			set_self(3075, 43, 2, 0, 0);
			set_self(3076, 43, 1, 0, 0);
			var r = GameUI.checkWareHouseInput(GameData.wareHouse.pInputCount, 1, 1);
			if (!r[0]) {
				GameData.wareHouse.pInputCount = r[1];
				GameUI.OpenTips("输入超出,已调整为最大！", ConstVal.Tips.time);
				GameUI.updateWareHouseInput();
			}
			break;
		case 2:
			set_self(3075, 43, 1, 0, 0);
			set_self(3076, 43, 2, 0, 0);
			var r = GameUI.checkWareHouseInput(GameData.wareHouse.pInputCount, 2, 1);
			if (!r[0]) {
				GameData.wareHouse.pInputCount = r[1];
				GameUI.OpenTips("输入超出,已调整为最大！", ConstVal.Tips.time);
				GameUI.updateWareHouseInput();
			}
			break;
		}
		break;
	}
}
//选择输入类型
GameUI.selectWareHouseInputType = function(type) {
	GameData.wareHouse.selectType = type;
	switch (type) {
	case 1:
		//
		set_self(3067, 43, 2, 0, 0);
		set_self(3068, 43, 1, 0, 0);
		break;
	case 2:
		//
		set_self(3067, 43, 1, 0, 0);
		set_self(3068, 43, 2, 0, 0);
		break;
	case 3:
		//
		set_self(3039, 43, 1, 0, 0);
		set_self(3038, 43, 2, 0, 0);
		break;
	case 4:
		//
		set_self(3039, 43, 2, 0, 0);
		set_self(3038, 43, 1, 0, 0);
		break;
	case 5:
		//
		set_self(3087, 43, 2, 0, 0);
		set_self(3088, 43, 1, 0, 0);
		set_self(3089, 43, 1, 0, 0);
		break;
	case 6:
		//
		set_self(3087, 43, 1, 0, 0);
		set_self(3088, 43, 2, 0, 0);
		set_self(3089, 43, 1, 0, 0);
		break;
	case 7:
		//
		set_self(3087, 43, 1, 0, 0);
		set_self(3088, 43, 1, 0, 0);
		set_self(3089, 43, 2, 0, 0);
		break;
	}
	GameUI.updateWareHouseInput();
}

//保险箱输入
GameUI.wareHouseInput = function(spid) {
	if (spid >= 3044 && spid <= 3053) { //数字输入 
		GameUI.wareHouseInputNumber(1, spid - 3044);
	} else if (spid == 3055) { //删除 
		GameUI.wareHouseInputNumber(2);
	} else if (spid == 3054) { //重输 
		GameUI.wareHouseInputNumber(3);
	}
}
//检测星星房卡数量合法性
GameUI.checkWareHouseInput = function(input, type, mode) { //input输入数量 type1房卡2星星,mode与1携带的比较还是仓库2里的比较 
	input = Number(input);
	//console.log("input:"+input+"type:"+type+"mode:"+mode);
	//if(input < 1000){
	//return [true,1000];
	//}else{
	//return [false,1000];
	//}
	//if(type == 1){
	//return [true,1000];
	//}else{
	//return [false,1000];
	//}
	if (type == 2) {
		switch (mode) {
		case 2:
			if (input > C_Player.wareHouseStarCount) {
				return [false, C_Player.wareHouseStarCount];
			}
			break;
		case 1:
			if (input > C_Player.bean) {
				if (C_Player.bean < 0) {
					return [false, 0];
				}
				if (C_Player.bean - GameData.initBean < 0) {
					return [false, 0];
				}
				return [false, C_Player.bean - GameData.initBean];
			}
			break;
		}
	}
	return [true, 1000];

}
//更新仓库赠送玩家信息 
GameUI.updateWareHousePlayerInfo = function() {
	if (GameData.wareHouse.pNickName) {
		set_self(3082, 7, "昵称:" + GameData.wareHouse.pNickName, 0, 0);
	} else {
		set_self(3082, 7, "", 0, 0);
	}
	if (GameData.wareHouse.pId) {
		set_self(3083, 7, "ID: " + GameData.wareHouse.pId, 0, 0);
	} else {
		set_self(3083, 7, "", 0, 0);
	}

	if(GameData.wareHouse.pImg){
		Func.up_imgurl(336, GameData.wareHouse.pImg);
		set_self(3081,1,336,0,0);
	}else{
		set_self(3081,1,170,0,0);
	}
	
}
GameUI.updateCount = function() {
	if(GameData.wareHouse.page == 1){
		GameUI.setNumberImage(3033, C_Player.wareHouseStarCount, 27); //仓库库存数量 
		GameUI.setNumberImage(3079, C_Player.bean, 27); //携带的星星数量 
		GameUI.setNumberImage(3080, C_Player.roomcard, 27); //房卡数量 
	}else{
		GameUI.setNumberImage(3033, C_Player.wareHouseStarCount, 27); //仓库库存数量
		GameUI.setNumberImage(3079, C_Player.wareHouseStarCount, 27); //携带的星星数量
		GameUI.setNumberImage(3080, C_Player.roomcard, 27); //房卡数量
	}
}
//开启广告倒计时 
GameUI.startAdCountDown = function() {
	set_self(3103, 37, 1, 0, 0);
	set_self(3104, 37, 1, 0, 0);
	var tt = Math.ceil(GameData.launchWaitTime / 1000);
	var ttext = "倒计时" + tt + "s";
	if (GameData.LoadCount == 100) {
		ttext += "  跳过";
	}
	set_self(3104, 7, ttext, 0, 0);
	set_self(3104, 20, ttext.gblen() * 12, 0, 0);
	GameUI.adaptPositionSpid(3104, 3103);
	GameData.adTimer = setInterval(function() {
		GameData.launchWaitTime -= 1000;
		if (GameData.launchWaitTime > 0) {
			var tt = Math.ceil(GameData.launchWaitTime / 1000);
			var ttext = "倒计时" + tt + "s";
			if (GameData.LoadCount == 100) {
				ttext += "  跳过";
			}
			set_self(3104, 7, ttext, 0, 0);
			set_self(3104, 20, ttext.gblen() * 12, 0, 0);
			GameUI.adaptPositionSpid(3104, 3103);
			GameUI.adaptPositionSpid(3104, 3103);
		} else {
			set_self(3103, 37, 0, 0, 0);
			set_self(3104, 37, 0, 0, 0);
			//console.log("倒计时结束");
			if (GameData.adTimer) {
				window.clearInterval(GameData.adTimer);
				GameData.adTimer = null;
			}
		}

	}, 1000);
}
GameUI.openMainSceneBtnPanel = function() {
	GameUI.closeRoomInfo();
	set_group(99, 37, 1, 0, 0);
	//app下载 
	if (GameData.h5Version == 1 && Game_Config.Share.appdownload) {
		set_self(656, 37, 1, 0, 0);
	} else {
		set_self(656, 37, 0, 0, 0);
	}
	//逃跑
	if (C_Player.status == 1 && Desk.playercnt == 2 && Desk.roomMode == 1 && Desk.infinite == 0 && Desk.stage == 0) {
		GameUI.showEscape();
	} else {
		GameUI.hideEscape();
	}
	//换房
	GameUI.showChangeRoom();



	if (GameData.matchId || Desk.infinite) { //解散按钮 
		set_self(185, 37, 0, 0, 0);

	}
	if (Desk.stage == 1) {
		//GameUI.hideExitBtn();
		switch (C_Player.canexit) {
		case 1:			
			//if (C_Player.status == 1) {
				//set_self(185, 37, 1, 0, 0);
			//} else {
				set_self(185, 37, 0, 0, 0);
			//}
			//if (Desk.infinite == 1 && !Game_Config.sysConfig.vipInfinite) {
				//set_self(181, 43, 3, 0, 0);
				//set_self(182, 37, 0, 0, 0);
				//set_self(181, 18, 520, 0, 0);
			//}
			//if (GameData.matchId) { //比赛房间
				//set_self(181, 43, 3, 0, 0);
				//GameUI.adaptPositionSpid(181, 41);
				//set_self(182, 37, 0, 0, 0);
			//}
			break;
		case 0:
			GameUI.hideExitBtn();
			//if (C_Player.status == 1) {
				set_self(185, 37, 1, 0, 0);
			//} else {
				//set_self(185, 37, 0, 0, 0);
			//}
			break;
		}
	} else {
		GameUI.showExitBtn();
		//解散
		if (C_Player.status == 1) {
			set_self(185, 37, 1, 0, 0);
		} else {
			set_self(185, 37, 0, 0, 0);
		}
	}
	if (Desk.infinite == 1) {
		GameUI.showExitBtn();
		set_self(185, 37, 0, 0, 0);
	}
	GameUI.adaptPannelBtn();

}
GameUI.adaptPannelBtn = function() {
	var spList = [151, 150, 185, 233, 3014, 513, 656];
	var posList = [75, 168, 261, 354, 447, 540, 633];
	//var spList = [235,13,604,3017,483,3018,3057];
	//var posList = [[395,198],[395,325],[395,452],[526,198],[526,325],[526,452],[657,198]];
	var posIndex = 0;
	for (var i = 0; i < spList.length; i++) {
		if (get_self(spList[i], 37, 0, 0, 0) == 1) {
			set_self(spList[i], 18, 0, 0, 0);
			set_self(spList[i], 19, posList[posIndex], 0, 0);
			posIndex++;
		}
	}
}
GameUI.playPanelAnimation = function(spidList, posList) {

}
GameUI.stopPanelAnimation = function(spidList, posList) {

}
GameUI.closeMainSceneBtnPanel = function() {
	set_group(99, 37, 0, 0, 0);
}
GameUI.updateMainSceneBtnPanel = function() {
	if (get_self(151, 37, 0, 0, 0)) { //当前开启状态 
		GameUI.openMainSceneBtnPanel();
		GameUI.closeMainSceneBtnPanel();
	}
}
GameUI.openRoomInfo = function() {
	//-
	//Desk.infinite = 1;
	//GameData.matchInfo = 111;
	//var obj = ifast_getobj(111);
	//obj.uidata.LineSpace= 1;
	if (get_self(149, 37, 0, 0, 0) == 0) {
		set_group(100, 37, 0, 0, 0);
		return;
	}
	GameUI.closeMainSceneBtnPanel();
	set_group(100, 37, 1, 0, 0);
	if (GameData.matchInfo) {
		set_self(512, 37, 0, 0, 0);
	}
	//var spaceX1 = 20;
	var spaceX2 = 30;
	var h1 = 60;
	var h2 = 25;
	var btspace = 20;
	var maxLen = 0;
	var desc = Game_Modify.getRoomTopDescAry(Desk.roomtype);
	if (!desc) {
		desc = [];
	}
	//if(Desk.shortcode && Game_Config.sysConfig.vipInfinite){
	var rTxt = "房间费"; //GameData.starName;
	if (Desk.rebateMode) {
		if (!Desk.roomMode && Desk.rebateType) {
			rTxt += "(" + GameData.sysConfig.charmName + ")";
		} else {
			rTxt += "(" + GameData.starName + ")";
		}
		switch (Desk.rebateMode) {
		case 1:
			rTxt += "大赢家:";
			break;
		case 2:
			rTxt += "赢家:";
			break;
		case 3:
			rTxt += "所有人:";
			break;
		}

	}
	if (Desk.rebateNumber) {
		//var mult = Game_Modify.getMult(Desk.roomtype,0);
		//var txt = Logic.getRebateDes(mult);
		desc.push(rTxt + Desk.rebateNumber);
	}

	var text = "";
	for (var i = 0; i < desc.length; i++) {
		if (String(desc[i]).gblen() > maxLen) {
			maxLen = String(desc[i]).gblen();
		}
		text += "● " + desc[i] + "\n";
	}
	maxLen += 2;
	var rmText = "房号:" + Desk.roomcode;
	if (Desk.infinite == 1) {
		rmText = "系统房";
		set_self(512, 37, 0, 0, 0);
	}
	if (Desk.shortcode && Game_Config.sysConfig.vipInfinite) {
		rmText = "房号:" + Desk.roomcode;
	}
	if (GameData.matchInfo) {
		rmText = "比赛房";
		set_self(512, 37, 0, 0, 0);
	}
	set_self(110, 7, rmText, 0, 0);
	set_self(110, 20, get_self(110, 7, 0, 0, 0).gblen() * 11.5, 0, 0);

	set_self(111, 7, text, 0, 0);
	set_self(111, 20, maxLen * 11.5, 0, 0);
	//set_self(111,18,get_self(512,18,0,0,0)+spaceX2,0,0);
	var bgW = get_self(111, 20, 0, 0) + 2 * spaceX2;
	var bkW = 280;
	set_self(109, 20, bkW, 0, 0);
	if (bgW > bkW) {
		set_self(109, 20, bgW, 0, 0);
	}
	var bgH = h1 + h2 * desc.length
	//if(get_self(512,37,0,0,0)){
	//bgH+=get_self(512,21,0,0,0)+2*btspace;
	//}else{
	bgH += 2 * btspace;
	//}

	set_self(109, 21, bgH, 0, 0);
	//set_self(512,19,get_self(109,19,0,0,0)+get_self(109,21,0,0,0) -get_self(512,21,0,0,0)-btspace,0,0);
	//设置对齐

	if (!get_self(512, 37, 0, 0, 0) || Desk.infinite == 1 || GameData.matchInfo) {
		GameUI.adaptPositionSpid(110, 109);

	} else {
		set_self(110, 18, get_self(109, 18, 0, 0, 0) + spaceX2);
	}
	//GameUI.adaptPositionSpid(111,109);
	//GameUI.adaptPositionSpid(512,109);
	set_self(111, 18, get_self(109, 18, 0, 0, 0) + spaceX2);

}
GameUI.closeRoomInfo = function() {
	set_group(100, 37, 0, 0, 0);
}
GameUI.playTopInfoAnimation = function() {
	var time = 5000;
	if (Desk.infinite == 1) {
		return;
	}
	if (GameData.matchInfo) {
		return;
	}
	//return;
	if (GameData.topInfoTimer) {
		window.clearInterval(GameData.topInfoTimer);
	}
	GameData.topInfoTimer = setInterval(function() {
		if (get_self(149, 37, 0, 0, 0)) {
			if (get_self(155, 37)) { //当前显示时钟 
				set_self(154, 37, 0, 0, 0);
				set_self(155, 37, 0, 0, 0);
				set_self(156, 37, 0, 0, 0);
				set_self(336, 37, 0, 0, 0);
				set_self(337, 37, 0, 0, 0);
				set_self(338, 37, 0, 0, 0);

				set_self(3141, 37, 1, 0, 0);
				set_self(3142, 37, 1, 0, 0);
			} else {
				set_self(154, 37, 1, 0, 0);
				set_self(155, 37, 1, 0, 0);
				set_self(156, 37, 1, 0, 0);
				set_self(336, 37, 1, 0, 0);
				set_self(337, 37, 1, 0, 0);
				set_self(338, 37, 1, 0, 0);

				set_self(3141, 37, 0, 0, 0);
				set_self(3142, 37, 0, 0, 0);

			}
		} else {
			GameUI.stopTopInfoAnimation();
		}
	}, time);
}
GameUI.stopTopInfoAnimation = function(bTemp) {
	if (GameData.topInfoTimer) {
		window.clearInterval(GameData.topInfoTimer);
	}
	if (bTemp) {
		set_self(154, 37, 0, 0, 0);
		set_self(155, 37, 0, 0, 0);
		set_self(156, 37, 0, 0, 0);
		set_self(336, 37, 0, 0, 0);
		set_self(337, 37, 0, 0, 0);
		set_self(338, 37, 0, 0, 0);

		set_self(3141, 37, 0, 0, 0);
		set_self(3142, 37, 0, 0, 0);
	}
}
GameUI.startRecord = function() {
	try {
		startRecordAac();
	} catch (e) {

	}

	set_group(101, 37, 1, 0, 0);
	set_self(3128, 43, 1, 0, 0);
	play_ani(1, 3128, 43, 1, 6, 0, 900, 0, 0, 0, 0, 0, 0, 0);
}
GameUI.stopRecord = function() {
	try {
		stopRecord();
	} catch (e) {

	}
	play_ani(0, 3128, 43, 1, 6, 0, 900, 0, 0, 0, 0, 0, 0, 0);
	set_group(101, 37, 0, 0, 0);
	set_self(3128, 43, 1, 0, 0);

}
GameUI.openTextInput = function(msg, callback, len) {
	if (!len) {
		len = 150;
	}
	GameData.textCallback = callback;
	set_group(102, 37, 1, 0, 0);
	setTimeout(function() {
		try {
			var obj = gameabc_face.getdiv("div3154");
			obj.click();
			obj.focus();
			obj.select();
			obj = null;
		} catch (e) {

		}
	}, 400);
	//var obj = gameabc_face.getdiv("div3154");
	//obj.click();
	//obj.focus();
	//obj=null;
	//var obj = gameabc_face.getdiv("div3154");
	//obj.style.autofocus = "autofocus";
	Func.setTextArea(3154, true, len);
	if (msg) {
		set_self(3154, 7, msg, 0, 0);
	} else {
		set_self(3154, 7, "", 0, 0);
	}
	set_self(3160, 7, "限制" + len + "字以内");
}
GameUI.closeTextInput = function() {
	var obj = gameabc_face.getdiv("div3154");
	obj.blur();
	obj = null;
	set_group(102, 37, 0, 0, 0);
}
//打开vip房间列表 
GameUI.openVipRoomList = function(bTemp) {
	set_self(234, 37, 0, 0, 0);
	GameData.vipRoomJump = true;
	if (!GameData.vipRoomTimer1) {
		GameData.vipRoomTimer1 = true;
		set_self(4, 57, GameData.sysConfig.vipFlushTime, 0, 0);
	}
	set_group(103, 37, 1, 0, 0);
	var allCharm = Utl.ReadData(Utl.Config.vipCharm);
	if(allCharm){
		allCharm = Number(allCharm);
	}else{
		allCharm=0;
	}
	if (C_Player.advanced) {
		set_self(3171, 37, 0, 0, 0);
		set_self(3170, 37, 0, 0, 0);
		//set_self(3197,7,"",0,0);
		GameData.allCharm = allCharm;
		GameUI.setNumberImage(3197,allCharm,23);
		GameUI.adaptPositionSpid(3197,3196);
		set_self(3198, 7, "(黑名单内玩家临时禁入房间，请尽快到后台处理好友关系)");
		if (!GameData.sysConfig.managerUrl) {
			set_self(3235, 37, 0, 0, 0);
		}
	} else {
		set_self(3183, 37, 0, 0, 0);
		set_self(3184, 37, 0, 0, 0);
		set_self(3171, 7, GameData.sysConfig.vipWx, 0, 0);
		set_self(3194,37,0,0,0);
		set_self(3195,37,0,0,0);
		set_self(3196,37,0,0,0);
		set_self(3197,37,0,0,0);
		set_self(3198,37,0,0,0);
		set_self(3214,37,0,0,0);
		set_self(3215,37,0,0,0);
		set_self(3235, 37, 0, 0, 0);
	}
	if (bTemp) {
		GameData.vipRoomPage = 0;
		set_self(ConstVal.vipRoomList1.f_spid, 19, ConstVal.vipRoomList1.clip_y, 0, 0);
		//set_self(ConstVal.vipRoomList2.f_spid,19,ConstVal.vipRoomList2.clip_y,0,0);
	}
	GameUI.updateVipRoomList();
	var data = {};
	data.agentid = GameData.AgentId;
	data.gameid = GameData.GameId
	data.shortcodeList = GameData.vipRoomShortList;
	Net.Send_getInfoByShortCode(data);

}
GameUI.closeVipRoomList = function() {
	GameData.vipRoomJump = false;
	set_group(103, 37, 0, 0, 0);
	set_self(234, 37, 1, 0, 0);
}
//设置vip房间列表数据
GameUI.setVipRoomListData = function(data) {
	//移除已经从列表中删除的房间 
	var temp = [];
	for (var i = 0; i < GameData.vipRoomShortList.length; i++) {
		var indx = min_ary_indexof(data, GameData.vipRoomShortList[i], "shortCode");
		if (indx > -1) {
			temp.push(data[indx]);
		}
	}
	GameData.vipRoomData = temp;
}
GameUI.updateVipRoomList = function() {
	if (get_self(6, 37, 0, 0, 0)) {
		switch (GameData.vipRoomPage) {
		case 0:
			GameUI.goVipPageOne();

			break;
		case 1:
			GameUI.goVipPageTwo();
			break;
		}
	}
}
GameUI.goVipPageOne = function() {
	GameData.vipRoomPage = 0;
	set_self(ConstVal.vipRoomList2.f_spid, 37, 0, 0, 0);
	set_self(3174, 43, 1, 0, 0);
	set_self(3175, 37, 0, 0, 0);
	set_self(3199, 37, 0, 0, 0);
	set_self(3259, 37, 0, 0, 0);
	GameUI.createVipRoomListPageOne();
}
GameUI.goVipPageTwo = function() {
	GameData.vipRoomPage = 1;
	set_self(ConstVal.vipRoomList1.f_spid, 37, 0, 0, 0);
	set_self(3174, 43, 2, 0, 0);
	set_self(3175, 37, 1, 0, 0);
	set_self(3199, 37, 1, 0, 0);
	//set_self(3259, 37, 1, 0, 0);
	//if(){
		
	//}
	GameUI.createVipRoomListPageTwo();
}
//创建vip房间列表页一
GameUI.createVipRoomListPageOne = function() {
	set_self(ConstVal.vipRoomList1.f_spid, 37, 1, 0, 0);
	if (GameData.vipRoomPageOne.cLength != GameData.vipRoomData.length) {
		//set_self(ConstVal.vipRoomList1.f_spid,37,1,0,0);
		GameUI.removeVipRoomListPageOne();
		var space = ConstVal.vipRoomList1.space;
		set_self(ConstVal.vipRoomList1.f_spid, 18, ConstVal.vipRoomList1.clip_x, 0, 0);
		set_self(ConstVal.vipRoomList1.f_spid, 19, ConstVal.vipRoomList1.clip_y, 0, 0);
		set_self(ConstVal.vipRoomList1.f_spid, 20, ConstVal.vipRoomList1.clip_w, 0, 0);
		set_self(ConstVal.vipRoomList1.f_spid, 21, space * GameData.vipRoomData.length, 0, 0);
		for (var i = 0; i < GameData.vipRoomData.length; i++) {
			//背景
			var bg = ifast_addtospritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.bg_spid, 0, space * i, ConstVal.vipRoomList1.bg_tag + i);
			//标题
			var title = ifast_addtospritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.title_spid, ConstVal.vipRoomList1.title_x, ConstVal.vipRoomList1.title_y + space * i, ConstVal.vipRoomList1.title_tag + i);
			var tTxt = "vip房间";
			if (GameData.vipRoomData[i].destwo) {
				tTxt = GameData.vipRoomData[i].destwo;
			}
			set_self(title, 7, tTxt, 0, 0);
			var des = ifast_addtospritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.des_spid, ConstVal.vipRoomList1.des_x, ConstVal.vipRoomList1.des_y + space * i, ConstVal.vipRoomList1.des_tag + i);
			//描述 
			if (GameData.vipRoomData[i].roomcodes) {
				var dTxt = "";
				if (GameData.vipRoomData[i].roomcodes) {
					dTxt = Game_Modify.getFullRoomInfo(GameData.vipRoomData[i].roomcodes.roomtype);
				}
				set_self(des, 7, dTxt, 0, 0);
			} else {
				set_self(des, 7, "房主还未创建房间！", 0, 0);
			}

			//房号 
			var code = ifast_addtospritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.code_spid, ConstVal.vipRoomList1.code_x, ConstVal.vipRoomList1.code_y + space * i, ConstVal.vipRoomList1.code_tag + i);
			var cTxt = GameData.vipRoomData[i].shortCode;
			set_self(code, 7, cTxt, 0, 0);
			//房主
			var owner = ifast_addtospritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.owner_spid, ConstVal.vipRoomList1.owner_x, ConstVal.vipRoomList1.owner_y + space * i, ConstVal.vipRoomList1.owner_tag + i);
			var oTxt = GameData.vipRoomData[i].owner;
			set_self(owner, 7, oTxt, 0, 0);
			//人数 
			var count = ifast_addtospritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.count_spid, ConstVal.vipRoomList1.count_x, ConstVal.vipRoomList1.count_y + space * i, ConstVal.vipRoomList1.count_tag + i);
			var coTxt = 0;
			for (var j = 0; j < GameData.vipRoomData[i].playerList.length; j++) {
				for (var k = 0; k < GameData.vipRoomData[i].playerList[j].length; k++) {
					if (GameData.vipRoomData[i].playerList[j][k]) {
						coTxt++;
					}
				}
			}
			set_self(count, 7, coTxt + " (人)", 0, 0);
			//关闭
			//var del = ifast_addtospritefromspritecopy(ConstVal.vipRoomList1.f_spid,ConstVal.vipRoomList1.del_spid,
			//ConstVal.vipRoomList1.del_x,ConstVal.vipRoomList1.del_y + space * i,ConstVal.vipRoomList1.del_tag + i); 
			var enter = ifast_addtospritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.enter_spid, ConstVal.vipRoomList1.enter_x, ConstVal.vipRoomList1.enter_y + space * i, ConstVal.vipRoomList1.enter_tag + i);

		}
		GameData.vipRoomPageOne.cLength = GameData.vipRoomData.length;

	} else {
		for (var i = 0; i < GameData.vipRoomData.length; i++) {
			//背景
			var tag = ConstVal.vipRoomList1.bg_tag + i;
			var bg = ConstVal.vipRoomList1.f_spid + "add" + tag;
			//标题
			tag = ConstVal.vipRoomList1.title_tag + i;
			var title = ConstVal.vipRoomList1.f_spid + "add" + tag;
			var tTxt = "vip房间";
			if (GameData.vipRoomData[i].destwo) {
				tTxt = GameData.vipRoomData[i].destwo;
			}
			set_self(title, 7, tTxt, 0, 0);
			//描述 
			tag = ConstVal.vipRoomList1.des_tag + i;
			var des = ConstVal.vipRoomList1.f_spid + "add" + tag;
			if (GameData.vipRoomData[i].roomcodes) {
				var dTxt = "";
				if (GameData.vipRoomData[i].roomcodes) {
					dTxt = Game_Modify.getFullRoomInfo(GameData.vipRoomData[i].roomcodes.roomtype);
				}
				set_self(des, 7, dTxt, 0, 0);
			} else {
				set_self(des, 7, "房主还未创建房间！", 0, 0);
			}
			//房号
			tag = ConstVal.vipRoomList1.code_tag + i;
			var code = ConstVal.vipRoomList1.f_spid + "add" + tag;
			var cTxt = GameData.vipRoomData[i].shortCode;
			set_self(code, 7, cTxt, 0, 0);
			//房主
			tag = ConstVal.vipRoomList1.owner_tag + i;
			var owner = ConstVal.vipRoomList1.f_spid + "add" + tag;
			var oTxt = GameData.vipRoomData[i].owner;
			set_self(owner, 7, oTxt, 0, 0);
			//人数
			tag = ConstVal.vipRoomList1.count_tag + i;
			var count = ConstVal.vipRoomList1.f_spid + "add" + tag;
			var coTxt = 0;
			for (var j = 0; j < GameData.vipRoomData[i].playerList.length; j++) {
				for (var k = 0; k < GameData.vipRoomData[i].playerList[j].length; k++) {
					if (GameData.vipRoomData[i].playerList[j][k]) {
						coTxt++;
					}
				}
			}
			set_self(count, 7, coTxt + " (人)", 0, 0);

		}
	}
}
//删除vip房间列表页一
GameUI.removeVipRoomListPageOne = function() {
	for (var i = 0; i < GameData.vipRoomPageOne.cLength; i++) {
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.bg_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.title_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.code_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.owner_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.count_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.del_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList1.f_spid, ConstVal.vipRoomList1.des_tag + i);
	}
	GameData.vipRoomPageOne.cLength = 0;
}
//创建vip房间列表页二 
GameUI.createVipRoomListPageTwo = function() {
	var indx = min_ary_indexof(GameData.vipRoomData, GameData.vipRoomCode, "shortCode");
	if (indx > -1) {
		set_self(ConstVal.vipRoomList2.f_spid, 37, 1, 0, 0);
		var rData = GameData.vipRoomData[indx];
		if (!rData.roomcodes) {
			return;
		}
		GameData.vipRoomPageTwo.data = rData;
		set_self(3259, 37, 1, 0, 0);
		if(GameData.vipRoomPageTwo.data.forbidSelect){
			set_self(3259, 7, "    比赛模式\n禁止自由选桌", 0, 0);
		}else{
			set_self(3259, 7, "    普通模式\n允许自由选桌", 0, 0);
		}
		//	if(GameData.vipRoomPageTwo.cLength != rData.playerList.length){
		if (GameData.vipRoomPageTwo.cLength != rData.roomcodes.roomlist.length) {
			//set_self(ConstVal.vipRoomList2.f_spid,37,1,0,0);
			GameUI.removeVipRoomListPageOne();
			var spaceX = ConstVal.vipRoomList2.spaceX;
			var spaceY = ConstVal.vipRoomList2.spaceY;
			set_self(ConstVal.vipRoomList2.f_spid, 18, ConstVal.vipRoomList2.clip_x, 0, 0);
			set_self(ConstVal.vipRoomList2.f_spid, 19, ConstVal.vipRoomList2.clip_y, 0, 0);
			set_self(ConstVal.vipRoomList2.f_spid, 20, spaceX * 2, 0, 0);
			set_self(ConstVal.vipRoomList2.f_spid, 21, spaceY * Math.ceil(rData.playerList.length / 2), 0, 0);
			for (var i = 0; i < rData.playerList.length; i++) {
				var plx = (i % 2) * spaceX;
				var ply = spaceY * Math.floor(i / 2);
				//背景
				var bg = ifast_addtospritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.bg_spid, plx, ply, ConstVal.vipRoomList2.bg_tag + i);
				if(rData.deskState[i]){
					set_self(bg,43,2,0,0);
				}else{
					set_self(bg,43,1,0,0);
				}
				//桌号
				var code = ifast_addtospritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.code_spid, plx + ConstVal.vipRoomList2.code_x, ply + ConstVal.vipRoomList2.code_y, ConstVal.vipRoomList2.code_tag + i);
				//set_self(code, 7, rData.roomcodes.roomlist[i], 0, 0);
				var dTag = i + 1;
				set_self(code, 7, dTag, 0, 0);
				set_self(code, 20, String(dTag).length * 23, 0, 0);
				GameUI.adaptPositionSpid(code,bg);
				//人数 
				var count = ifast_addtospritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.count_spid, plx + ConstVal.vipRoomList2.count_x, ply + ConstVal.vipRoomList2.count_y, ConstVal.vipRoomList2.count_tag + i);
				var coTxt = 0;
				for (var k = 0; k < rData.playerList[i].length; k++) {
					if (rData.playerList[i][k]) {
						coTxt++;
					}
				}
				var cTxt = "人数:" + coTxt + "/" + rData.seatCount[i];
				set_self(count, 7, cTxt, 0, 0);
				set_self(count, 20, cTxt.gblen() * ConstVal.vipRoomList2.countW, 0, 0);
				GameUI.adaptPositionX(count, plx + get_self(ConstVal.vipRoomList2.bg_spid, 20, 0, 0, 0) / 2);
			}
			GameData.vipRoomPageTwo.cLength = rData.playerList.length;
		} else {
			for (var i = 0; i < rData.playerList.length; i++) {
				var plx = (i % 2) * ConstVal.vipRoomList2.spaceX;
				var tag = ConstVal.vipRoomList2.code_tag + i;
				var code = ConstVal.vipRoomList2.f_spid + "add" + tag;
				set_self(code, 7, rData.roomcodes.roomlist[i], 0, 0);
				tag = ConstVal.vipRoomList2.bg_tag + i;
				var bg = ConstVal.vipRoomList2.f_spid + "add" + tag;
				if(rData.deskState[i]){
					set_self(bg,43,2,0,0);
				}else{
					set_self(bg,43,1,0,0);
				}
				var tag = ConstVal.vipRoomList2.count_tag + i;
				var count = ConstVal.vipRoomList2.f_spid + "add" + tag;
				var coTxt = 0;
				for (var k = 0; k < rData.playerList[i].length; k++) {
					if (rData.playerList[i][k]) {
						coTxt++;
					}
				}
				var cTxt = "人数:" + coTxt + "/" + rData.seatCount[i];
				set_self(count, 7, cTxt, 0, 0);
				set_self(count, 20, cTxt.gblen() * ConstVal.vipRoomList2.countW, 0, 0);
				GameUI.adaptPositionX(count, plx + get_self(ConstVal.vipRoomList2.bg_spid, 20, 0, 0, 0) / 2);

			};
		}
	} else {
		GameUI.removeVipRoomListPageOne();
	}
}
//删除vip房间列表页二 
GameUI.removeVipRoomListPageTwo = function() {
	for (var i = 0; i < GameData.vipRoomPageTwo.cLength; i++) {
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.bg_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.code_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRoomList2.f_spid, ConstVal.vipRoomList2.count_tag + i);
	}
	GameData.vipRoomPageTwo.cLength = 0;
}
var playeridInputCallBack = function(data){
	//if(String(data).length == 6){
		GameData.allCharm = Number(data);
		Utl.closeInputPanel();
		GameUI.setNumberImage(3197,data,23);
		GameUI.adaptPositionSpid(3197,3196);	
	//}else{
		//GameUI.OpenTips("玩家id长度为6位！",ConstVal.Tips.time);
	//}
}
GameUI.setTextSpid = function(spid,msg,width){
	set_self(spid,7,msg,0,0,0);
	set_self(spid,20,String(msg).gblen()*width,0,0,0);
	console.log(msg,String(msg).gblen());
}
GameUI.openBlackList = function(){
	set_group(104,37,1,0,0);
	GameData.blackList.inputId = "";
	if(GameData.blackList.inputId){
		//set_self(3212,7,GameData.blackList.inputId,0,0);
		GameUI.setTextSpid(3212,GameData.blackList.inputId,GameData.blackList.idWidth);
		
	}else{
		//set_self(3212,7,"点击输入玩家ID",0,0);
		GameUI.setTextSpid(3212,"点击输入玩家ID",GameData.blackList.idWidth);
	}
	set_self(3261,7,"解散该玩家所在房间(已开战提前解散)",0,0);
	//blackInputCallBack("");
	GameUI.adaptPositionSpid(3212,3205);
	GameUI.createBlackList();
}
GameUI.closeBlackList = function(){
	set_group(104,37,0,0,0);
}
var blackInputCallBack = function(data){
	if(String(data).length == 6){
		Utl.closeInputPanel();
		GameData.blackList.inputId = data;
		if(GameData.blackList.inputId){
			//set_self(3212,7,GameData.blackList.inputId,0,0);
			GameUI.setTextSpid(3212,GameData.blackList.inputId,GameData.blackList.idWidth);
		}else{
			//set_self(3212,7,"点击输入玩家ID",0,0);
			GameUI.setTextSpid(3212,"点击输入玩家ID",GameData.blackList.idWidth);
		}
		GameUI.adaptPositionSpid(3212,3205);
	}else{
		GameUI.OpenTips("玩家id长度为6位！",ConstVal.Tips.time);
	}
}
GameUI.createBlackList = function(){
	GameUI.removeBlackList();
	set_self(ConstVal.blackList.f_spid,18,ConstVal.blackList.clip_x,0,0);
	var space = get_self(ConstVal.blackList.bg_spid,21,0,0,0) + ConstVal.blackList.space;
	var listLength = GameData.blackList.data.length;
	set_self(ConstVal.blackList.f_spid,21,listLength*space,0,0);
	for(var i=0;i<listLength;i++){
		//背景
		var bg = ifast_addtospritefromspritecopy(ConstVal.blackList.f_spid, ConstVal.blackList.bg_spid,
		 0, space*i, ConstVal.blackList.bg_tag + i);
		//玩家id 
		var id = ifast_addtospritefromspritecopy(ConstVal.blackList.f_spid, ConstVal.blackList.id_spid,
		 ConstVal.blackList.id_x, ConstVal.blackList.id_y+space*i, ConstVal.blackList.id_tag + i);
		 
		set_self(id,7,"ID: "+GameData.blackList.data[i],0,0);
		
		//删除
		var id = ifast_addtospritefromspritecopy(ConstVal.blackList.f_spid, ConstVal.blackList.del_spid,
		 ConstVal.blackList.del_x, ConstVal.blackList.del_y+space*i, ConstVal.blackList.del_tag + i); 
		 
	}
	GameData.blackList.length = listLength;
}
GameUI.removeBlackList = function(){
	for (var i = 0; i < GameData.blackList.length; i++) {
		ifast_dllpritefromspritecopy(ConstVal.blackList.f_spid, ConstVal.blackList.bg_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.blackList.f_spid, ConstVal.blackList.id_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.blackList.f_spid, ConstVal.blackList.del_tag + i);
	}
	GameData.blackList.length = 0;
}
GameUI.openVipRank = function(){
	set_group(105,37,1,0,0);
	set_self(3226,7,"您不在榜单内",0,0);
	if(GameData.vipRank.data){
		if(GameData.vipRank.data.myRank){
			set_self(3226,7,"我的排名:"+GameData.vipRank.data.myRank+"       我的魅力:"+GameData.vipRank.data.myScore,0,0);
		}
	}
	var txt = GameData.vipRoomPageTwo.data.destwo;
	if(!txt){
		txt = "排行榜";
		
	}
	set_self(3224,7,txt,0,0);
	set_self(3224,20,txt.gblen()*9,0,0);
	GameUI.adaptPositionX(3224,600);
	GameUI.createVipRank(); 
}
GameUI.closeVipRank = function(){
	set_group(105,37,0,0,0);
}
GameUI.createVipRank = function(){
	GameUI.removeVipRank();
	if(GameData.vipRank.data){
		if(GameData.vipRank.data.rankList){
			var rLength = GameData.vipRank.data.rankList.length;
			var space = get_self(ConstVal.vipRank.bg_spid,21,0,0,0) + ConstVal.vipRank.space;
			set_self(ConstVal.vipRank.f_spid,18,ConstVal.vipRank.clip_x,0,0);
			set_self(ConstVal.vipRank.f_spid,21,rLength*space,0,0);
			for(var i=0;i<rLength;i++){
				//背景
				var bg = ifast_addtospritefromspritecopy(ConstVal.vipRank.f_spid, ConstVal.vipRank.bg_spid,
				 0, space*i, ConstVal.vipRank.bg_tag + i);
				 //排名
				var rNumber = i+1;
				var rank = ifast_addtospritefromspritecopy(ConstVal.vipRank.f_spid, ConstVal.vipRank.rank_spid,
				 ConstVal.vipRank.rank_x, ConstVal.vipRank.rank_y+space*i, ConstVal.vipRank.rank_tag + i);
				GameUI.setNumberImage(rank,rNumber,ConstVal.vipRank.rank_w);
				//id 
				var txt = ifast_addtospritefromspritecopy(ConstVal.vipRank.f_spid, ConstVal.vipRank.txt_spid,
				 ConstVal.vipRank.rank_x+get_self(rank,20,0,0,0)+ConstVal.vipRank.rank_space, ConstVal.vipRank.txt_y+space*i, ConstVal.vipRank.txt_tag + i);
				
				set_self(txt,7,"ID:"+GameData.vipRank.data.rankList[i][0],0,0);
				//积分 
				var score = ifast_addtospritefromspritecopy(ConstVal.vipRank.f_spid, ConstVal.vipRank.score_spid,
				 ConstVal.vipRank.score_x, ConstVal.vipRank.score_y+space*i, ConstVal.vipRank.score_tag + i);

				set_self(score,7,"魅力:"+GameData.vipRank.data.rankList[i][2],0,0);
				
			}
			GameData.vipRank.length = rLength;
		}
	}
}
GameUI.removeVipRank = function(){
	for (var i = 0; i < GameData.vipRank.length; i++) {
		ifast_dllpritefromspritecopy(ConstVal.vipRank.f_spid, ConstVal.vipRank.bg_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRank.f_spid, ConstVal.vipRank.txt_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRank.f_spid, ConstVal.vipRank.rank_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.vipRank.f_spid, ConstVal.vipRank.score_tag + i);
	}
	GameData.vipRank.length = 0;
}
var rebateLimitCallback = function(data){
	Utl.closeInputPanel();
	GameUI.Mem.snrOption.rebateLimit = data;
	GameUI.setNumberImage(3237,data,18);
	GameUI.adaptPositionSpid(3237,3236);
}
GameUI.openPhoneBind = function(){
	if(GameData.phoneType == 2){
		set_self(3252,43,1,0,0);
	}else{
		set_self(3252,43,2,0,0);
	}
	set_self(3247,7,"",0,0);
	set_self(3248,7,"",0,0);
	set_self(5, 57, 0, 0, 0);
	var readData = Logic.readPhoneCode();
	var phoneNumber = "";
	var code = "";
	var restTime = 0;
	if(readData){
		phoneNumber = readData.phoneNumber;
		restTime = readData.restTime;
		code = readData.code;
	}
	GameData.phoneCodeTime = restTime;
	set_group(106,37,1,0,0);
	if(phoneNumber){
		GameUI.setPhoneNumber(phoneNumber);
	}else{
		//set_self(3247,37,0,0,0);
		set_self(3247,37,0,0,0);
	}
	if(restTime){
		set_self(5, 57, 1000, 0, 0);
		set_self(3245,43,1,0,0);
		GameUI.setCodeTime(restTime);
	}else{
		set_self(3245,43,2,0,0);
		set_self(3246,37,0,0,0);
	}
	set_self(3248,37,0,0,0);
}
GameUI.closePhoneBind = function(){
	set_group(106,37,0,0,0);
}
var phoneNumberCallback = function(data){
	Utl.closeInputPanel();
	if(data){
		GameUI.setPhoneNumber(data);
	}
}
var phoneCodeCallback = function(data){
	Utl.closeInputPanel();
	if(data){
		GameUI.setPhoneCode(data);
		set_self(3250,37,0,0,0);	
	}
}
GameUI.setPhoneNumber = function(data){
	if(data){
		set_self(3249,37,0,0,0);
		set_self(3247,37,1,0,0);
		GameData.phoneNumber = data;
		//set_self(3247,7,GameData.phoneNumber,0,0);
		GameUI.setNumberImage(3247,GameData.phoneNumber,21);
	}
}
GameUI.setPhoneCode = function(code){
	if(code){
		GameData.phoneCode = code;
		set_self(3248,37,1,0,0);
		set_self(3250,37,0,0,0);
		set_self(3248,7,code,0,0);
		//set_self(3248,20,String(code).length*12,0,0);
		GameUI.setNumberImage(3248,code,21);
		//GameUI.adaptPositionSpid(3248,3244);
	}
}
GameUI.setCodeTime = function(time){
	var codeTime = time+"b";
	set_self(3246,7,codeTime,0,0);
	//set_self(3246,20,String(codeTime).length*12,0,0);
	GameUI.setNumberImage(3246,codeTime,21);
	GameUI.adaptPositionSpid(3246,3245);
}
GameUI.openSharePannel = function(){
	set_group(107,37,1,0,0);
}
GameUI.closeSharePannel = function(){
	set_group(107,37,0,0,0);
}
GameUI.openWhiteList = function(){
	set_group(108,37,1,0,0);
	GameData.whiteList.inputId = "";
	GameUI.updatePlayerID();
	GameData.whiteList.inputCharm = "";
	GameUI.updateCharm();
	GameData.whiteList.searchId = "";
	GameUI.updateSearch();
	//set_self(3261,7,"解散该玩家所在房间(已开战提前解散)",0,0);
	//blackInputCallBack("");
	
	GameUI.createWhiteList();
}
GameUI.updateCharm = function(){
	if(GameData.whiteList.inputCharm){
		//set_self(3212,7,GameData.blackList.inputId,0,0);
		GameUI.setTextSpid(3283,GameData.whiteList.inputCharm,GameData.whiteList.idWidth);
	}else{
		//set_self(3212,7,"点击输入玩家ID",0,0);
		GameData.whiteList.inputCharm = 0;
		GameUI.setTextSpid(3283,"0",GameData.blackList.idWidth);
	}
	GameUI.adaptPositionSpid(3283,3282);
}
GameUI.updatePlayerID = function(){
	if(GameData.whiteList.inputId){
		//set_self(3212,7,GameData.blackList.inputId,0,0);
		GameUI.setTextSpid(3280,GameData.whiteList.inputId,GameData.whiteList.idWidth);
	}else{
		//set_self(3212,7,"点击输入玩家ID",0,0);
		GameUI.setTextSpid(3280,"玩家ID",GameData.blackList.idWidth);
	}
	GameUI.adaptPositionSpid(3280,3275);
}
GameUI.updateSearch = function(){
	if(GameData.whiteList.searchId){
		//set_self(3212,7,GameData.blackList.inputId,0,0);
		GameUI.setTextSpid(3288,GameData.whiteList.searchId,GameData.whiteList.idWidth);
	}else{
		//set_self(3212,7,"点击输入玩家ID",0,0);
		GameUI.setTextSpid(3288,"玩家ID",GameData.blackList.idWidth);
	}
	GameUI.adaptPositionSpid(3288,3287);
}
GameUI.closeWhiteList = function(){
	set_group(108,37,0,0,0);
}
GameUI.searchWhiteList = function(pid){
	if(!pid){
		GameUI.OpenTips("请输入玩家ID",ConstVal.Tips.time);
		return;
	}
	var tmp = false;
	for(var i=0;i< GameData.whiteList.data.length;i++ ){
		if(GameData.whiteList.data[i] && GameData.whiteList.data[i][0] == pid){
			GameData.whiteList.inputId = pid;
			GameData.whiteList.inputCharm = GameData.whiteList.data[i][2];
			GameUI.updatePlayerID();
			GameUI.updateCharm();
			tmp = true;
			break;
		}
	}
	if(!tmp){
		GameUI.OpenTips("该玩家不在名单中",ConstVal.Tips.time);
	}
}

var whiteInputCallBack1 = function(data){
	if(String(data).length == 6){
		Utl.closeInputPanel();
		GameData.whiteList.inputId = data;
		GameUI.updatePlayerID();
	}else{
		GameUI.OpenTips("玩家id长度为6位！",ConstVal.Tips.time);
	}
}
var whiteInputCallBack2 = function(data){
	Utl.closeInputPanel();
	GameData.whiteList.inputCharm = data;
	GameUI.updateCharm();
}
var whiteInputCallBack3 = function(data){
	if(String(data).length == 6){
		Utl.closeInputPanel();
		GameData.whiteList.searchId = data;
		GameUI.updateSearch();
	}else{
		GameUI.OpenTips("玩家id长度为6位！",ConstVal.Tips.time);
	}
}
GameUI.createWhiteList = function(){
	GameUI.removeWhiteList();
	set_self(ConstVal.whiteList.f_spid,18,ConstVal.whiteList.clip_x,0,0);
	set_self(ConstVal.whiteList.f_spid,19,ConstVal.whiteList.clip_y,0,0);
	var space = get_self(ConstVal.whiteList.bg_spid,21,0,0,0) + ConstVal.whiteList.space;
	var listLength = GameData.whiteList.data.length;
	set_self(ConstVal.whiteList.f_spid,21,listLength*space,0,0);
	for(var i=0;i<listLength;i++){
		//背景
		var bg = ifast_addtospritefromspritecopy(ConstVal.whiteList.f_spid, ConstVal.whiteList.bg_spid,
		 0, space*i, ConstVal.whiteList.bg_tag + i);
		//玩家id
		var id = ifast_addtospritefromspritecopy(ConstVal.whiteList.f_spid, ConstVal.whiteList.id_spid,
		 ConstVal.whiteList.id_x, ConstVal.whiteList.id_y+space*i, ConstVal.whiteList.id_tag + i);
		
		
		set_self(id,7,"ID: "+GameData.whiteList.data[i][0],0,0);
		
		//玩家id
		var cid = ifast_addtospritefromspritecopy(ConstVal.whiteList.f_spid, ConstVal.whiteList.charm_spid,
		 ConstVal.whiteList.charm_x, ConstVal.whiteList.charm_y+space*i, ConstVal.whiteList.charm_tag + i);


		set_self(cid,7,"魅力值: "+GameData.whiteList.data[i][2],0,0);
		//删除
		var id = ifast_addtospritefromspritecopy(ConstVal.whiteList.f_spid, ConstVal.whiteList.del_spid,
		 ConstVal.whiteList.del_x, ConstVal.whiteList.del_y+space*i, ConstVal.whiteList.del_tag + i);

	}
	GameData.whiteList.length = listLength;
}
GameUI.removeWhiteList = function(){
	for (var i = 0; i < GameData.whiteList.length; i++) {
		ifast_dllpritefromspritecopy(ConstVal.whiteList.f_spid, ConstVal.whiteList.bg_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.whiteList.f_spid, ConstVal.whiteList.id_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.whiteList.f_spid, ConstVal.whiteList.del_tag + i);
		ifast_dllpritefromspritecopy(ConstVal.whiteList.f_spid, ConstVal.whiteList.charm_tag + i);
	}
	GameData.whiteList.length = 0;
}

















