コード例 #1
0
        public InventorySlotView BuildEquipSlot(Slot slot)
        {
            var view = new InventorySlotView(slot);

            view.MouseClick += Slot_view_MouseUp;
            return(view);
        }
コード例 #2
0
 public void InitSlots()
 {
     Children.Clear();
     foreach (var slot in Inventory.slots)
     {
         var view = new InventorySlotView(slot)
         {
             Width = slot_width, Height = slot_height
         };
         RegisterChild(view);
         view.MouseClick += View_MouseUp;
     }
     Width = slot_width * Inventory.Cols + slot_margin * (Inventory.Cols - 1);
     // Height = slot_height * Inventory.Rows + slot_margin * (Inventory.Rows - 1);
 }