示例#1
0
        public override void DropItem(Item dropped)
        {
            GumpItems.Add(dropped as BBGumpItem);

            RefreshAllGumps();

            base.DropItem(dropped);
        }
示例#2
0
        public void MoveElement(int layer, int direction)
        {
            if (GumpItems == null || GumpItems.Count < 0)
            {
                return;
            }

            int oldIndex = layer;

            int newIndex = layer + direction;

            if (newIndex < 0 || newIndex >= GumpItems.Count)
            {
                return;
            }

            BBGumpItem element = GumpItems[oldIndex];

            GumpItems.Remove(element);
            GumpItems.Insert(newIndex, element);
            RefreshAllGumps();
        }
示例#3
0
        public void DeleteElement(int GumpIndex)
        {
            if (GumpIndex < GumpItems.Count && GumpIndex >= 0)
            {
                BBGumpItem item = GumpItems[GumpIndex];

                GumpItems.RemoveAt(GumpIndex);

                item.Delete();

                if (GumpItems.Count <= 0)
                {
                    PlayerMobile pm = RootParent as PlayerMobile;

                    pm.CloseAllGumps();

                    Delete();
                }
                else
                {
                    RefreshAllGumps();
                }
            }
        }