/// <summary> /// khởi tạo giao diện /// </summary> private void CreateInterface() { // khởi tạo window inventory win = new Window(manager); win.Init(); win.Center(); win.Height = 260; win.Width = 224; win.Text = "Inventory"; win.AutoScroll = false; win.Resizable = false; win.IconVisible = false; win.Visible = false; manager.Add(win); // khởi tạo bảng thông tin chi tiết item gp = new ItemDetailsBox(manager); gp.Init(); gp.Alpha = 200; //gp.IconVisible = false; gp.CloseButtonVisible = false; gp.Text = "Thông tin"; gp.Width = 150; gp.Height = 260; gp.Top = 0; gp.Left = 0; gp.CanFocus = true; gp.Visible = false; manager.Add(gp); // khởi tạo hiển thị chi tiết item lbdetail = new Label(manager); lbdetail.Init(); lbdetail.Parent = gp; lbdetail.Top = 0; lbdetail.Left = 0; lbdetail.Width = 100; lbdetail.Height = 70; lbdetail.Alignment = Alignment.TopLeft; lbdetail.Text = "info"; // khởi tạo tab phân loại item tab = new TabControl(manager); tab.Init(); tab.Top = 0; tab.Left = 0; tab.Width = 211; tab.Height = 254 - 32; tab.AddPage(); tab.TabPages[0].Text = "Equips"; tab.TabPages[0].BackColor = Color.White; tab.AddPage(); tab.TabPages[1].Text = "Use"; tab.TabPages[1].BackColor = Color.White; tab.AddPage(); tab.TabPages[2].Text = "Keys"; tab.TabPages[2].BackColor = Color.White; tab.AddPage(); tab.TabPages[3].Text = "Other"; tab.TabPages[3].BackColor = Color.White; win.Add(tab); // thêm item box vào các tab for (int j = 0; j < 4; j++) { int y = -1; int x = 0; listItembox.Add(new ItemBox[slot]); for (int i = 0; i < slot; i++) { if (x % 6 == 0) { y++; x = 0; } // khởi tạo item box ItemBox imgslot = new ItemBox(manager); imgslot.Init(); imgslot.Left = x * 32 + 6; imgslot.Top = y * 32 + 1; imgslot.Width = 32; imgslot.Height = 32; imgslot.Parent = tab.TabPages[j]; imgslot.BackImage = textureSlot1; //imgslot.SizeMode = SizeMode.Centered; imgslot.MouseOver += new MouseEventHandler(imgslot_MouseOver); imgslot.MouseOut += new MouseEventHandler(imgslot_MouseOut); imgslot.Click += new TomShane.Neoforce.Controls.EventHandler(imgslot_Click); imgslot.Tag = i; listItembox[j][i] = imgslot; x++; } } // cái này có lẽ bỏ :)) CreateItemDetailLayout(); }