修复登录界面 公告弹窗不关闭的问题
This commit is contained in:
		
							parent
							
								
									cdbe4a31fe
								
							
						
					
					
						commit
						670dce02e9
					
				|  | @ -22,6 +22,9 @@ class _Login_Window extends Yosin_Window { | ||||||
|     //信息 |     //信息 | ||||||
|     PackInfo = null; |     PackInfo = null; | ||||||
| 
 | 
 | ||||||
|  |     //公告框 | ||||||
|  |     NoticeBox = null; | ||||||
|  | 
 | ||||||
|     constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { |     constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { | ||||||
|         base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); |         base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); | ||||||
| 
 | 
 | ||||||
|  | @ -36,12 +39,13 @@ class _Login_Window extends Yosin_Window { | ||||||
| 
 | 
 | ||||||
|         //注册登录回调包 |         //注册登录回调包 | ||||||
|         MySocket.RegisterHandler(2, function(Jso) { |         MySocket.RegisterHandler(2, function(Jso) { | ||||||
|  |             if (NoticeBox) NoticeBox.CloseWindow(); | ||||||
|             //登录成功 |             //登录成功 | ||||||
|             if (Jso.state) { |             if (Jso.state) { | ||||||
|                 _Yosin_MessageBox("登录成功,正在进入游戏..."); |                 NoticeBox = _Yosin_MessageBox("登录成功,正在进入游戏..."); | ||||||
|                 MySocket.Send(9, null); |                 MySocket.Send(9, null); | ||||||
|             } else { |             } else { | ||||||
|                 _Yosin_MessageBox("登录失败"); |                 NoticeBox = _Yosin_MessageBox("登录失败"); | ||||||
|             } |             } | ||||||
|         }.bindenv(this)); |         }.bindenv(this)); | ||||||
| 
 | 
 | ||||||
|  | @ -59,6 +63,10 @@ class _Login_Window extends Yosin_Window { | ||||||
|                     info.equip.append(value); |                     info.equip.append(value); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | 
 | ||||||
|  |             //关闭登录界面 | ||||||
|  |             NoticeBox.CloseWindow(); | ||||||
|  |             CloseWindow(); | ||||||
|             local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0); |             local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0); | ||||||
|             Window.Init(PackInfo); |             Window.Init(PackInfo); | ||||||
|         }.bindenv(this)); |         }.bindenv(this)); | ||||||
|  | @ -154,6 +162,7 @@ class _Login_Window extends Yosin_Window { | ||||||
|         }); |         }); | ||||||
|         PasswordTextActor.SetPosition(720, 281); |         PasswordTextActor.SetPosition(720, 281); | ||||||
|         Addchild(PasswordTextActor); |         Addchild(PasswordTextActor); | ||||||
|  | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue