Inheritance: GumpEntry
		private AddGrapeVineGump( Mobile from, object notice, int varietyindex, GumpPage page ) : base( 40, 40 )
		{
			m_From = from;
			m_Page = page;
			m_VarietyIndex = varietyindex;

			from.CloseGump( typeof( AddGrapeVineGump ) );

			AddPage( 0 );

			AddBackground( 0, 0, 530, 407, 5054 );
			AddImageTiled( 10, 10, 510, 22, 2624 );
			AddImageTiled( 10, 292, 150, 45, 2624 );
			AddImageTiled( 165, 292, 355, 45, 2624 );
			AddImageTiled( 10, 342, 510, 55, 2624 );
			AddImageTiled( 10, 37, 245, 250, 2624 );
			AddImageTiled( 260, 37, 260, 250, 2624 );
			AddAlphaRegion( 10, 10, 510, 387 );

			AddHtml( 10, 12, 510, 20, "<basefont color="+LabelColor+"><CENTER>Add Grapevine Menu</CENTER></basefont>", false, false );

			AddHtml( 10, 37, 245, 22, "<basefont color="+LabelColor+"><CENTER>VINE TYPE</CENTER></basefont>", false, false );
			AddHtml( 250, 37, 260, 22, "<basefont color="+LabelColor+"><CENTER>VINE DETAILS</CENTER></basefont>", false, false );
			AddHtmlLocalized( 10, 302, 150, 25, 1044012, LabelColor, false, false );

			AddButton( 15, 372, 4017, 4019, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 50, 375, 150, 18, 1011441, LabelColor, false, false );

			AddButton( 270, 372, 4005, 4007, GetButtonID( 5, 1 ), GumpButtonType.Reply, 0 );
			AddHtml( 305, 375, 150, 18, "<basefont color="+LabelColor+">MOVE</basefont>", false, false );

			AddButton( 270, 345, 4005, 4007, GetButtonID( 5, 2 ), GumpButtonType.Reply, 0 );
			AddHtml( 305, 348, 150, 18, "<basefont color="+LabelColor+">DELETE</basefont>", false, false );

			if ( notice is int && (int)notice >= 0 )
				AddHtml( 170, 295, 350, 40, "<basefont color="+LabelColor+">"+m_Types[(int)notice].m_VineName+"</basefont>", false, false );
			else if ( notice is string )
				AddHtml( 170, 295, 350, 40, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", FontColor, notice ), false, false );

			AddButton( 15, 345, 4005, 4007, GetButtonID( 5, 0 ), GumpButtonType.Reply, 0 );
			if (m_VarietyIndex >= 0 )
			{
				AddHtml( 50, 348, 250, 18, "<basefont color="+LabelColor+">"+m_Grapes[varietyindex].m_Name+"</basefont>", false, false );
			}
			else
			{
				m_VarietyIndex = 0;
				AddHtml( 50, 348, 250, 18, "<basefont color="+LabelColor+">"+m_Grapes[0].m_Name+"</basefont>", false, false );
			}

			CreateGroupList();

			if ( page == GumpPage.PickResource )
				CreateResList( false );
			else if ( page == GumpPage.PickResource2 )
				CreateResList( true );
			else if ( page == GumpPage.DisplayItem && ( notice is int && (int)notice >= 0 ) )
				CreateItemDisplay( (int)notice );
		}
Ejemplo n.º 2
0
        private ItemExperienceGump(Mobile from, Item item, AttributeCategory cat, GumpPage page)
            : base(40, 40)
        {
            this.m_From = from;
            this.m_Item = item;
            this.m_Cat  = cat;
            this.m_Page = page;

            from.CloseGump(typeof(ItemExperienceGump));

            this.Closable   = true;
            this.Disposable = true;
            this.Dragable   = true;
            this.Resizable  = false;

            this.AddPage(0);
            this.AddBackground(50, 35, 540, 382, 9270);
            this.AddAlphaRegion(66, 91, 219, 170);
            this.AddAlphaRegion(66, 49, 508, 34);
            this.AddAlphaRegion(292, 91, 283, 279);
            this.AddAlphaRegion(66, 269, 219, 101);

            this.AddLabel(262, 56, TitleHue, @"Item Experience");

            this.AddLabel(136, 93, TitleHue, @"Categories");
            this.AddButton(75, 116, 4005, 4007, GetButtonID(1, 0), GumpButtonType.Reply, 0);
            this.AddLabel(112, 117, LabelHue, @"Melee Attributes");
            this.AddButton(75, 138, 4005, 4007, GetButtonID(1, 1), GumpButtonType.Reply, 0);
            this.AddLabel(112, 139, LabelHue, @"Magic Attributes");
            this.AddButton(75, 160, 4005, 4007, GetButtonID(1, 2), GumpButtonType.Reply, 0);
            this.AddLabel(112, 161, LabelHue, @"Character Stats");
            this.AddButton(75, 182, 4005, 4007, GetButtonID(1, 3), GumpButtonType.Reply, 0);
            this.AddLabel(112, 183, LabelHue, @"Resistances");
            if (this.m_Item is BaseWeapon)
            {
                this.AddButton(75, 204, 4005, 4007, GetButtonID(1, 4), GumpButtonType.Reply, 0);
            }
            this.AddLabel(112, 205, LabelHue, @"Weapon Hits");
            this.AddButton(75, 226, 4005, 4007, GetButtonID(1, 5), GumpButtonType.Reply, 0);
            this.AddLabel(112, 227, LabelHue, @"Misc. Attributes");

            this.AddLabel(394, 93, TitleHue, @"Attributes");

            this.AddImage(0, 4, 10440);
            this.AddImage(554, 4, 10441);

            this.CreateItemExpList();

            this.AddButton(280, 379, 241, 243, 0, GumpButtonType.Reply, 0); //Cancel

            if (page == GumpPage.AttributeList)
            {
                this.CreateAttributeList(cat);
            }
        }
Ejemplo n.º 3
0
        private ItemExperienceGump(Mobile from, Item item, AttributeCategory cat, GumpPage page)
            : base(40, 40)
        {
            this.m_From = from;
            this.m_Item = item;
            this.m_Cat = cat;
            this.m_Page = page;

            from.CloseGump(typeof(ItemExperienceGump));

            this.Closable = true;
            this.Disposable = true;
            this.Dragable = true;
            this.Resizable = false;

            this.AddPage(0);
            this.AddBackground(50, 35, 540, 382, 9270);
            this.AddAlphaRegion(66, 91, 219, 170);
            this.AddAlphaRegion(66, 49, 508, 34);
            this.AddAlphaRegion(292, 91, 283, 279);
            this.AddAlphaRegion(66, 269, 219, 101);

            this.AddLabel(262, 56, TitleHue, @"Item Experience");

            this.AddLabel(136, 93, TitleHue, @"Categories");
            this.AddButton(75, 116, 4005, 4007, GetButtonID(1, 0), GumpButtonType.Reply, 0);
            this.AddLabel(112, 117, LabelHue, @"Melee Attributes");
            this.AddButton(75, 138, 4005, 4007, GetButtonID(1, 1), GumpButtonType.Reply, 0);
            this.AddLabel(112, 139, LabelHue, @"Magic Attributes");
            this.AddButton(75, 160, 4005, 4007, GetButtonID(1, 2), GumpButtonType.Reply, 0);
            this.AddLabel(112, 161, LabelHue, @"Character Stats");
            this.AddButton(75, 182, 4005, 4007, GetButtonID(1, 3), GumpButtonType.Reply, 0);
            this.AddLabel(112, 183, LabelHue, @"Resistances");
            if (this.m_Item is BaseWeapon)
                this.AddButton(75, 204, 4005, 4007, GetButtonID(1, 4), GumpButtonType.Reply, 0);
            this.AddLabel(112, 205, LabelHue, @"Weapon Hits");
            this.AddButton(75, 226, 4005, 4007, GetButtonID(1, 5), GumpButtonType.Reply, 0);
            this.AddLabel(112, 227, LabelHue, @"Misc. Attributes");

            this.AddLabel(394, 93, TitleHue, @"Attributes");

            this.AddImage(0, 4, 10440);
            this.AddImage(554, 4, 10441);

            this.CreateItemExpList();

            this.AddButton(280, 379, 241, 243, 0, GumpButtonType.Reply, 0); //Cancel

            if (page == GumpPage.AttributeList)
                this.CreateAttributeList(cat);
        }
Ejemplo n.º 4
0
		private void CreatePageElement(GumpPage e)
		{
			_CurrentPageNode = _Document.CreateElement(e.GetType().Name);
		}
Ejemplo n.º 5
0
		public virtual void Write(string name, GumpPage e)
		{
			AppendPage();
			CreatePageElement(e);
			SetPageAttribute("name", name);
			SetPageAttribute("value", e.Page);
		}
        private AddGrapeVineGump(Mobile from, object notice, int varietyindex, GumpPage page) : base(40, 40)
        {
            m_From         = from;
            m_Page         = page;
            m_VarietyIndex = varietyindex;

            from.CloseGump(typeof(AddGrapeVineGump));

            AddPage(0);

            AddBackground(0, 0, 530, 407, 5054);
            AddImageTiled(10, 10, 510, 22, 2624);
            AddImageTiled(10, 292, 150, 45, 2624);
            AddImageTiled(165, 292, 355, 45, 2624);
            AddImageTiled(10, 342, 510, 55, 2624);
            AddImageTiled(10, 37, 245, 250, 2624);
            AddImageTiled(260, 37, 260, 250, 2624);
            AddAlphaRegion(10, 10, 510, 387);

            AddHtml(10, 12, 510, 20, "<basefont color=" + LabelColor + "><CENTER>Add Grapevine Menu</CENTER></basefont>", false, false);

            AddHtml(10, 37, 245, 22, "<basefont color=" + LabelColor + "><CENTER>VINE TYPE</CENTER></basefont>", false, false);
            AddHtml(250, 37, 260, 22, "<basefont color=" + LabelColor + "><CENTER>VINE DETAILS</CENTER></basefont>", false, false); // <CENTER>SELECTIONS</CENTER>
            AddHtmlLocalized(10, 302, 150, 25, 1044012, LabelColor, false, false);                                                  // <CENTER>NOTICES</CENTER>

            AddButton(15, 372, 4017, 4019, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(50, 375, 150, 18, 1011441, LabelColor, false, false);

            AddButton(270, 372, 4005, 4007, GetButtonID(5, 1), GumpButtonType.Reply, 0);
            AddHtml(305, 375, 150, 18, "<basefont color=" + LabelColor + ">MOVE</basefont>", false, false);

            AddButton(270, 345, 4005, 4007, GetButtonID(5, 2), GumpButtonType.Reply, 0);
            AddHtml(305, 348, 150, 18, "<basefont color=" + LabelColor + ">DELETE</basefont>", false, false);
            // ****************************************

            // Notices ********************************
            if (notice is int && (int)notice >= 0)
            {
                AddHtml(170, 295, 350, 40, "<basefont color=" + LabelColor + ">" + m_Types[(int)notice].m_VineName + "</basefont>", false, false);
            }
            else if (notice is string)
            {
                AddHtml(170, 295, 350, 40, String.Format("<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", FontColor, notice), false, false);
            }
            // ****************************************

            // Resource selection *********************
            AddButton(15, 345, 4005, 4007, GetButtonID(5, 0), GumpButtonType.Reply, 0);
            if (m_VarietyIndex >= 0)
            {
                AddHtml(50, 348, 250, 18, "<basefont color=" + LabelColor + ">" + m_Grapes[varietyindex].m_Name + "</basefont>", false, false);
            }
            else
            {
                m_VarietyIndex = 0;
                AddHtml(50, 348, 250, 18, "<basefont color=" + LabelColor + ">" + m_Grapes[0].m_Name + "</basefont>", false, false);
            }
            // ****************************************

            CreateGroupList();

            if (page == GumpPage.PickResource)
            {
                CreateResList(false);
            }
            else if (page == GumpPage.PickResource2)
            {
                CreateResList(true);
            }
            else if (page == GumpPage.DisplayItem && (notice is int && (int)notice >= 0))
            {
                CreateItemDisplay((int)notice);
            }
        }