コード例 #1
0
            public TransmuteGump(Mobile from, BaseTransmutationContainer target, Item lifted)
                : base(0, 0)
            {
                if (target == null || from == null)
                    return;

                this.m_From = from;
                this.m_Target = target;

                this.Closable = true;
                this.Dragable = true;

                int count = 0;
                // figure out how many items are in the box
                if (target.Items != null)
                {
                    count = target.Items.Count;
                }
    			
                int displayeditems = count;
                if (lifted != null && count > 0)
                {
                    displayeditems = count - 1;
                }

                int height = 160 + LineSpacing * displayeditems;
                int width = 350;

                this.AddPage(0);
                //AddBackground( 0, 0, width, height, 0x242C );
                this.AddBackground(0, 0, width, height, 0xA28);
                //AddAlphaRegion( 2, 2, width - 4, height - 4 );

                this.AddLabel(width / 2 - 55, 15, TitleColor, target.Name);

                this.AddLabel(20, 45, ContentTitleColor, String.Format("Contents:"));

                this.AddImageTiled(15, 65, width - 30, 20, 0x242D);
                this.AddImageTiled(15, height - 70, width - 30, 20, 0x242D);

                // go through and list all of the items in the box
                int y = 85;
                for (int i = 0; i < count; i++)
                {
                    if (target.Items[i] is Item)
                    {
                        Item item = target.Items[i] as Item;
                        
                        if (item == lifted)
                            continue;

                        string name = null;
                        if (item.Name != null)
                        {
                            name = item.Name;
                        }
                        else
                        {
                            name = item.GetType().Name;
                        }
                        this.AddLabel(80, y, ContentColor, name);
                        this.AddLabel(20, y, ContentColor, item.Amount.ToString());
                        y += LineSpacing;
                    }
                }

                //AddButton( width/2 - 20, height - 35, 2130, 2129, 1, GumpButtonType.Reply, 0 ); // Okay button
                this.AddButton(width / 2 - 43, height - 45, 0x1454, 0x1455, 1, GumpButtonType.Reply, 0); // Apply button
            }
コード例 #2
0
            public TransmuteGump(Mobile from, BaseTransmutationContainer target, Item lifted) : base(0, 0)
            {
                if (target == null || from == null)
                {
                    return;
                }

                m_From   = from;
                m_Target = target;

                Closable = true;
                Dragable = true;

                int count = 0;

                // figure out how many items are in the box
                if (target.Items != null)
                {
                    count = target.Items.Count;
                }

                int displayeditems = count;

                if (lifted != null && count > 0)
                {
                    displayeditems = count - 1;
                }

                int height = 160 + LineSpacing * displayeditems;
                int width  = 350;

                AddPage(0);
                //AddBackground( 0, 0, width, height, 0x242C );
                AddBackground(0, 0, width, height, 0xA28);
                //AddAlphaRegion( 2, 2, width - 4, height - 4 );

                AddLabel(width / 2 - 55, 15, TitleColor, target.Name);

                AddLabel(20, 45, ContentTitleColor, String.Format("Contents:"));

                AddImageTiled(15, 65, width - 30, 20, 0x242D);
                AddImageTiled(15, height - 70, width - 30, 20, 0x242D);


                // go through and list all of the items in the box
                int y = 85;

                for (int i = 0; i < count; i++)
                {
                    if (target.Items[i] is Item)
                    {
                        Item item = target.Items[i] as Item;

                        if (item == lifted)
                        {
                            continue;
                        }

                        string name = null;
                        if (item.Name != null)
                        {
                            name = item.Name;
                        }
                        else
                        {
                            name = item.GetType().Name;
                        }
                        AddLabel(80, y, ContentColor, name);
                        AddLabel(20, y, ContentColor, item.Amount.ToString());
                        y += LineSpacing;
                    }
                }

                //AddButton( width/2 - 20, height - 35, 2130, 2129, 1, GumpButtonType.Reply, 0 ); // Okay button
                AddButton(width / 2 - 43, height - 45, 0x1454, 0x1455, 1, GumpButtonType.Reply, 0);         // Apply button
            }
コード例 #3
0
 public TransmuteEntry(Mobile from, BaseTransmutationContainer box)
     : base(6190, 2)
 {
     this.m_From = from;
     this.m_Box = box;
 }
コード例 #4
0
 public TransmuteEntry(Mobile from, BaseTransmutationContainer box) : base(6190, 2)
 {
     m_From = from;
     m_Box  = box;
 }