| 
									
										
										
										
											2025-01-09 22:23:33 +08:00
										 |  |  | /* | 
					
						
							|  |  |  | 文件名:5_Inventory.nut | 
					
						
							|  |  |  | 路径:User/UI/Window/5_Inventory.nut | 
					
						
							|  |  |  | 创建日期:2025-01-02	12:37 | 
					
						
							|  |  |  | 文件用途: 背包窗口 | 
					
						
							|  |  |  | */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class _Inventory extends Yosin_Window { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     item = null; | 
					
						
							|  |  |  |     dressUpTitleBtn = null; | 
					
						
							|  |  |  |     petTitleBtn = null; | 
					
						
							|  |  |  |     stoneTitleBtn = null; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { | 
					
						
							|  |  |  |         base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         local title = Yosin_TopTitle(gWidth, gHeight, "装备栏(I)"); | 
					
						
							|  |  |  |         AddUIChild(title); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-10 23:05:50 +08:00
										 |  |  |         local item2 = Yosin_EmeStretch(0, 0, 80, 25, "sprite/interface/lenheartwindowcommon.img", 160); | 
					
						
							|  |  |  |         item2.SetPos(100, 100); | 
					
						
							| 
									
										
										
										
											2025-01-09 22:23:33 +08:00
										 |  |  |         Addchild(item2); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         //注册控件 | 
					
						
							|  |  |  |         RegisterWidget(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function RegisterWidget() { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         //, "装扮", "宠物", "护石" | 
					
						
							|  |  |  |         local titlesBtn = Yosin_RowMoreTitleBtn(10, 25, ["物品栏"]); | 
					
						
							|  |  |  |         AddUIChild(titlesBtn); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         titlesBtn.LBDownOnClick = function(btns, index) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         local item = Yosin_SplicingButton(10, 50, 80, 25, "sprite/interface/lenheartwindowcommon.img", 160, true, false); | 
					
						
							|  |  |  |         AddUIChild(item); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     //逻辑入口 | 
					
						
							|  |  |  |     function Proc(Dt) { | 
					
						
							|  |  |  |         SyncPos(X, Y); | 
					
						
							|  |  |  |         base.Proc(Dt); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |