Пример #1
0
        public static Gump OpenSpellbook(Item container)
        {
            Gump ToAdd = Spells.OpenSpellbook(container.Circle, container.LastSpell, container);

            ToAdd.X = (Engine.ScreenWidth - ToAdd.Width) / 2;
            ToAdd.Y = (Engine.ScreenHeight - ToAdd.Height) / 2;
            Gumps.Desktop.Children.Add(ToAdd);
            return(ToAdd);
        }
Пример #2
0
        protected override void OnDoubleClicked()
        {
            this.m_Container.BookIconX = this.m_X;
            this.m_Container.BookIconY = this.m_Y;
            int x = this.m_Book.X;
            int y = this.m_Book.Y;

            Gumps.Destroy((Gump)this);
            Gumps.Destroy(this.m_Book);
            Gump gump = Spells.OpenSpellbook(this.m_Container);

            gump.X = this.m_Book.X;
            gump.Y = this.m_Book.Y;
        }
Пример #3
0
        private static void ChangeCircle_OnClick(Gump sender)
        {
            Gump   parent    = sender.Parent;
            Item   container = (Item)parent.GetTag("Container");
            object tag       = sender.GetTag("Circle");

            if (container == null)
            {
                return;
            }
            int circle = tag == null ? 0 : (int)tag;
            int x      = parent.X;
            int y      = parent.Y;

            Gumps.Destroy(parent);
            Gump ToAdd = Spells.OpenSpellbook(circle, container.LastSpell, container);

            ToAdd.X = x;
            ToAdd.Y = y;
            Gumps.Desktop.Children.Add(ToAdd);
        }