示例#1
0
        protected internal virtual void PlaceItem(Item item)
        {
            var x          = col * (SLOT_SIZE + SLOT_MARGIN);
            var y          = TITLE_HEIGHT + row * (SLOT_SIZE + SLOT_MARGIN);
            var itemButton = new ItemButton(this, item);

            itemButton.SetPos(x, y);
            Add(itemButton);
            itemButton.Item(item);

            if (++col >= COLS)
            {
                col = 0;
                row++;
            }

            count++;
        }