Beispiel #1
0
        public void CallCommand(Mobile from)
        {
            AddOnEditor_Att addoneditor = (AddOnEditor_Att)XmlAttach.FindAttachment(from, typeof(AddOnEditor_Att));

            CommandEventArgs e = new CommandEventArgs(from, "", "", new string[0]);

            AddonEdit_OnCommand(e);
        }
Beispiel #2
0
        public void Resend(Mobile from)
        {
            AddOnEditor_Att addoneditor = (AddOnEditor_Att)XmlAttach.FindAttachment(from, typeof(AddOnEditor_Att));

            if (from.HasGump(typeof(AddOnEditor)))
            {
                from.CloseGump(typeof(AddOnEditor));
            }
            from.SendGump(new AddOnEditor(from, addoneditor));
        }
Beispiel #3
0
        public AddOnEditor( Mobile from, AddOnEditor_Att att )
            : base(100, 100)
        {
            _AddOnAtt = att;

            Closable=true; Disposable=true; Dragable=true; Resizable=false;
            AddPage(0);

            // Buttons hidden behind the background, but are still functional
            AddButton(27, 80, 1042, 248, (int)Buttons.Select, GumpButtonType.Reply, 0);
            AddButton(27, 117, 1042, 248, (int)Buttons.AddItem, GumpButtonType.Reply, 0);
            AddButton(27, 154, 1042, 248, (int)Buttons.RemoveItem, GumpButtonType.Reply, 0);
            AddButton(27, 191, 1042, 248, (int)Buttons.DeleteItem, GumpButtonType.Reply, 0);
            AddButton(27, 228, 1042, 248, (int)Buttons.InspectItem, GumpButtonType.Reply, 0);

            AddBackground(0, 0, 241, 287, 9270);
            AddBackground(15, 15, 211, 257, 9200);
            AddHtml( 21, 18, 196, 18, @"<BASEFONT COLOR=#FFFFFF><center><big>Addon Editor", (bool)false, (bool)false);

            string TypeName;

            if( att.SelectedAddon != null )
                 TypeName = att.SelectedAddon.GetType().ToString();
            else { TypeName = "An Addon has not been selected"; }

            AddHtml( 17, 32, 207, 41, String.Format( @"Link: {0}", TypeName ), (bool)false, (bool)false);

            // Backgrounds used to represent the buttons
            AddBackground(30, 80, 175, 27, 9500);
            AddHtml( 34, 86, 165, 17, @"<BASEFONT COLOR=#FFFFFF><center>Select AddOn", (bool)false, (bool)false);

            AddBackground(30, 117, 175, 27, 9500);
            AddHtml( 34, 123, 165, 17, @"<BASEFONT COLOR=#FFFFFF><center>Add Item", (bool)false, (bool)false);

            AddBackground(30, 154, 175, 27, 9500);
            AddHtml( 34, 160, 165, 17, @"<BASEFONT COLOR=#FFFFFF><center>Remove Item", (bool)false, (bool)false);

            AddBackground(30, 191, 175, 27, 9500);
            AddHtml( 34, 197, 165, 17, @"<BASEFONT COLOR=#FFFFFF><center>Delete Item", (bool)false, (bool)false);

            /*
            // Removed from planned implementation, can't think of any real use for this
            AddBackground(30, 228, 175, 27, 9500);
            AddHtml( 34, 234, 165, 17, @"<BASEFONT COLOR=#FFFFFF><center>Inspect Item", (bool)false, (bool)false);
            */
        }
Beispiel #4
0
        public static void AddonEdit_OnCommand(CommandEventArgs e)
        {
            AddOnEditor_Att addoneditor = (AddOnEditor_Att)XmlAttach.FindAttachment(e.Mobile, typeof(AddOnEditor_Att));

            if (addoneditor == null)
            {
                XmlAttach.AttachTo(e.Mobile, new AddOnEditor_Att());
                AddonEdit_OnCommand(e);
            }
            else
            {
                if (e.Mobile.HasGump(typeof(AddOnEditor)))
                {
                    e.Mobile.CloseGump(typeof(AddOnEditor));
                }
                e.Mobile.SendGump(new AddOnEditor(e.Mobile, addoneditor));
            }
        }