当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.CloseGump方法代码示例

本文整理汇总了C#中Mobile.CloseGump方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.CloseGump方法的具体用法?C# Mobile.CloseGump怎么用?C# Mobile.CloseGump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile的用法示例。


在下文中一共展示了Mobile.CloseGump方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HousePlacementCategoryGump

        public HousePlacementCategoryGump(Mobile from)
            : base(50, 50)
        {
            this.m_From = from;

            from.CloseGump(typeof(HousePlacementCategoryGump));
            from.CloseGump(typeof(HousePlacementListGump));

            this.AddPage(0);

            this.AddBackground(0, 0, 270, 145, 5054);

            this.AddImageTiled(10, 10, 250, 125, 2624);
            this.AddAlphaRegion(10, 10, 250, 125);

            this.AddHtmlLocalized(10, 10, 250, 20, 1060239, LabelColor, false, false); // <CENTER>HOUSE PLACEMENT TOOL</CENTER>

            this.AddButton(10, 110, 4017, 4019, 0, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(45, 110, 150, 20, 3000363, LabelColor, false, false); // Close

            this.AddButton(10, 40, 4005, 4007, 1, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(45, 40, 200, 20, 1060390, LabelColor, false, false); // Classic Houses

            this.AddButton(10, 60, 4005, 4007, 2, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(45, 60, 200, 20, 1060391, LabelColor, false, false); // 2-Story Customizable Houses

            this.AddButton(10, 80, 4005, 4007, 3, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(45, 80, 200, 20, 1060392, LabelColor, false, false); // 3-Story Customizable Houses
        }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:29,代码来源:HousePlacementTool.cs

示例2: RulesetGump

        public RulesetGump(Mobile from, Ruleset ruleset, RulesetLayout page, DuelContext duelContext, bool readOnly)
            : base(readOnly ? 310 : 50, 50)
        {
            this.m_From = from;
            this.m_Ruleset = ruleset;
            this.m_Page = page;
            this.m_DuelContext = duelContext;
            this.m_ReadOnly = readOnly;

            this.Dragable = !readOnly;

            from.CloseGump(typeof(RulesetGump));
            from.CloseGump(typeof(DuelContextGump));
            from.CloseGump(typeof(ParticipantGump));

            RulesetLayout depthCounter = page;
            int depth = 0;

            while (depthCounter != null)
            {
                ++depth;
                depthCounter = depthCounter.Parent;
            }

            int count = page.Children.Length + page.Options.Length;

            this.AddPage(0);

            int height = 35 + 10 + 2 + (count * 22) + 2 + 30;

            this.AddBackground(0, 0, 260, height, 9250);
            this.AddBackground(10, 10, 240, height - 20, 0xDAC);

            this.AddHtml(35, 25, 190, 20, this.Center(page.Title), false, false);

            int x = 35;
            int y = 47;

            for (int i = 0; i < page.Children.Length; ++i)
            {
                this.AddGoldenButton(x, y, 1 + i);
                this.AddHtml(x + 25, y, 250, 22, page.Children[i].Title, false, false);

                y += 22;
            }

            for (int i = 0; i < page.Options.Length; ++i)
            {
                bool enabled = ruleset.Options[page.Offset + i];

                if (readOnly)
                    this.AddImage(x, y, enabled ? 0xD3 : 0xD2);
                else
                    this.AddCheck(x, y, 0xD2, 0xD3, enabled, i);

                this.AddHtml(x + 25, y, 250, 22, page.Options[i], false, false);

                y += 22;
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:60,代码来源:RulesetGump.cs

示例3: ImbuingGump

        public ImbuingGump(Mobile from)
            : base(520, 340)
        {
            Mobile m = from;
            PlayerMobile pm = from as PlayerMobile;

            from.CloseGump(typeof(ImbuingGumpB));
            from.CloseGump(typeof(ImbuingGumpC));

            ImbuingContext context = Imbuing.GetContext(pm);

            context.Imbue_ModVal = 0;
            context.ImbMenu_Cat = 0;

            AddPage(0);
            AddBackground(0, 0, 540, 340, 5054);

            AddImageTiled(10, 10, 520, 25, 2624);

            AddImageTiled(10, 35, 520, 10, 5124);
            AddAlphaRegion(10, 35, 520, 10);

            AddImageTiled(10, 45, 520, 245, 2624);

            AddImageTiled(10, 290, 520, 10, 5124);
            AddAlphaRegion(10, 290, 520, 10);

            AddImageTiled(10, 300, 520, 20, 2624);

            AddImageTiled(10, 320, 520, 10, 2624);
            AddAlphaRegion(10, 320, 520, 10);

            AddHtmlLocalized(10, 14, 520, 16, 1079588, LabelColor, false, false); //<CENTER>IMBUING MENU</CENTER>

            AddButton(25, 66, 4017, 4018, 10005, GumpButtonType.Reply, 0);
            AddHtmlLocalized(66, 68, 430, 18, 1080423, LabelColor, false, false); //IMBUE ITEM: Adds or modifies a magic item property on the targeted item.<BR>UNRAVEL ITEM: Extracts one or more magical ingredients from an item. The targeted item is DESTROYED in the process.<BR>REIMBUE LAST: Reimbues the last item with the last property/intensity<BR>REIMBUE ITEM: Auto targets the last imbued item

            AddButton(25, 95, 4017, 4018, 10006, GumpButtonType.Reply, 0);
            AddHtmlLocalized(66, 97, 430, 18, 1113622, LabelColor, false, false); //Reimbue Last - Repeats the last imbuing attempt

            AddButton(25, 124, 4017, 4018, 10007, GumpButtonType.Reply, 0);
            AddHtmlLocalized(66, 126, 430, 18, 1113571, LabelColor, false, false); //Imbue Last Item - Auto targets the last imbued item

            AddButton(25, 153, 4017, 4018, 10008, GumpButtonType.Reply, 0);
            AddHtmlLocalized(66, 155, 430, 18, 1114274, LabelColor, false, false); //Imbue Last Property - Imbues a new item with the last property

            AddButton(25, 184, 4017, 4018, 10010, GumpButtonType.Reply, 0);
            AddHtmlLocalized(66, 186, 430, 18, 1080431, LabelColor, false, false); //Unravel Item - Extracts magical ingredients from an item, destroying it

            AddButton(25, 213, 4017, 4018, 10011, GumpButtonType.Reply, 0);
            AddHtmlLocalized(66, 215, 430, 18, 1114275, LabelColor, false, false); //Unravel Container - Unravels all items in a container

            //AddButton(25, 242, 4017, 4018, 10012, GumpButtonType.Reply, 0);
            //AddHtml(66, 244, 430, 18, "<BASEFONT COLOR=#FFFFFF>Soul Reinforcement - Fortify a cursed artifact", false, false);

            AddButton(19, 300, 4017, 4018, 10002, GumpButtonType.Reply, 0);
            AddHtmlLocalized(58, 300, 50, 16, 1006045, FontColor, false, false); //CANCEL
        }
开发者ID:bittiez,项目名称:ServUO,代码行数:58,代码来源:ImbuingGump.cs

示例4: CraftGumpItem

        public CraftGumpItem( Mobile from, CraftSystem craftSystem, CraftItem craftItem, BaseTool tool )
            : base(40, 40)
        {
            m_From = from;
            m_CraftSystem = craftSystem;
            m_CraftItem = craftItem;
            m_Tool = tool;

            from.CloseGump( typeof( CraftGump ) );
            from.CloseGump( typeof( CraftGumpItem ) );

            AddPage( 0 );
            AddBackground( 0, 0, 530, 417, 5054 );
            AddImageTiled( 10, 10, 510, 22, 2624 );
            AddImageTiled( 10, 37, 150, 148, 2624 );
            AddImageTiled( 165, 37, 355, 90, 2624 );
            AddImageTiled( 10, 190, 155, 22, 2624 );
            AddImageTiled( 10, 217, 150, 53, 2624 );
            AddImageTiled( 165, 132, 355, 80, 2624 );
            AddImageTiled( 10, 275, 155, 22, 2624 );
            AddImageTiled( 10, 302, 150, 53, 2624 );
            AddImageTiled( 165, 217, 355, 80, 2624 );
            AddImageTiled( 10, 360, 155, 22, 2624 );
            AddImageTiled( 165, 302, 355, 80, 2624 );
            AddImageTiled( 10, 387, 510, 22, 2624 );
            AddAlphaRegion( 10, 10, 510, 399 );

            AddHtmlLocalized( 170, 40, 150, 20, 1044053, LabelColor, false, false ); // ITEM
            AddHtmlLocalized( 10, 192, 150, 22, 1044054, LabelColor, false, false ); // <CENTER>SKILLS</CENTER>
            AddHtmlLocalized( 10, 277, 150, 22, 1044055, LabelColor, false, false ); // <CENTER>MATERIALS</CENTER>
            AddHtmlLocalized( 10, 362, 150, 22, 1044056, LabelColor, false, false ); // <CENTER>OTHER</CENTER>

            if ( craftSystem.GumpTitleNumber > 0 )
                AddHtmlLocalized( 10, 12, 510, 20, craftSystem.GumpTitleNumber, LabelColor, false, false );
            else
                AddHtml( 10, 12, 510, 20, craftSystem.GumpTitleString, false, false );

            AddButton( 15, 387, 4014, 4016, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 50, 390, 150, 18, 1044150, LabelColor, false, false ); // BACK

            AddButton( 270, 387, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 305, 390, 150, 18, 1044151, LabelColor, false, false ); // MAKE NOW

            if ( craftItem.NameNumber > 0 )
                AddHtmlLocalized( 330, 40, 180, 18, craftItem.NameNumber, LabelColor, false, false );
            else
                AddLabel( 330, 40, LabelHue, craftItem.NameString );

            if ( craftItem.UseAllRes )
                AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1048176, LabelColor, false, false ); // Makes as many as possible at once

            DrawItem();
            DrawSkill();
            DrawRessource();

            if( craftItem.RequiresSE )
                AddHtmlLocalized( 170, 302 + (m_OtherCount++ * 20), 310, 18, 1063363, LabelColor, false, false ); //* Requires the "Samurai Empire" expansion
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:58,代码来源:CraftGumpItem.cs

示例5: OnDoubleClick

		public override void OnDoubleClick(Mobile from)
		{
			if (from != null && from is PlayerMobile)
			{
				from.CloseGump(typeof(DuelPlayerInfoGump));
				from.CloseGump(typeof(DuelScoreBoardGump));
				from.SendGump(new DuelScoreBoardGump());
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:9,代码来源:DuelingScoreboard.cs

示例6: OnDoubleClick

		public override void OnDoubleClick(Mobile m)
		{
			if (!m.InRange(GetWorldLocation(), 2) || ValorRewardController.Instance == null)
			{
				return;
			}
			m.CloseGump(typeof(ValorBoardGump));
			m.CloseGump(typeof(ValorBoardGumpBritish));
			m.CloseGump(typeof(ValorBoardGumpSide));
			m.SendGump(new ValorBoardGumpBritish());
			m.SendGump(new ValorBoardGump(ValorRewardController.Instance, 0, null, null, null, false));
			m.SendGump(new ValorBoardGumpSide(m, m, ValorRewardController.Instance));
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:13,代码来源:ValorBoard.cs

示例7: OnDoubleClick

 public override void OnDoubleClick(Mobile from)
 {
     if (from.Backpack == null || !IsChildOf(from.Backpack))
     {
         from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
     }
     else
     {
         from.CloseGump(typeof(LayeredSpellbookTicketHueGump));
         from.CloseGump(typeof(LayeredSpellbookTicketNameGump));
         from.SendGump(new LayeredSpellbookTicketHueGump(from, this));
     }
 }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:13,代码来源:LayeredSpellbookTicket.cs

示例8: ParticipantGump

        public ParticipantGump(Mobile from, DuelContext context, Participant p)
            : base(50, 50)
        {
            this.m_From = from;
            this.m_Context = context;
            this.m_Participant = p;

            from.CloseGump(typeof(RulesetGump));
            from.CloseGump(typeof(DuelContextGump));
            from.CloseGump(typeof(ParticipantGump));

            int count = p.Players.Length;

            if (count < 4)
                count = 4;

            this.AddPage(0);

            int height = 35 + 10 + 22 + 22 + 30 + 22 + 2 + (count * 22) + 2 + 30;

            this.AddBackground(0, 0, 300, height, 9250);
            this.AddBackground(10, 10, 280, height - 20, 0xDAC);

            this.AddButton(240, 25, 0xFB1, 0xFB3, 3, GumpButtonType.Reply, 0);

            //AddButton( 223, 54, 0x265A, 0x265A, 4, GumpButtonType.Reply, 0 );

            this.AddHtml(35, 25, 230, 20, this.Center("Participant Setup"), false, false);

            int x = 35;
            int y = 47;

            this.AddHtml(x, y, 200, 20, String.Format("Team Size: {0}", p.Players.Length), false, false);
            y += 22;

            this.AddGoldenButtonLabeled(x + 20, y, 1, "Increase");
            y += 22;
            this.AddGoldenButtonLabeled(x + 20, y, 2, "Decrease");
            y += 30;

            this.AddHtml(35, y, 230, 20, this.Center("Players"), false, false);
            y += 22;

            for (int i = 0; i < p.Players.Length; ++i)
            {
                DuelPlayer pl = p.Players[i];

                this.AddGoldenButtonLabeled(x, y, 5 + i, String.Format("{0}: {1}", 1 + i, pl == null ? "Empty" : pl.Mobile.Name));
                y += 22;
            }
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:51,代码来源:ParticipantGump.cs

示例9: SmallBODAcceptGump

		public SmallBODAcceptGump( Mobile from, SmallBOD deed ) : base( 50, 50 )
		{
			m_From = from;
			m_Deed = deed;

			m_From.CloseGump( typeof( LargeBODAcceptGump ) );
			m_From.CloseGump( typeof( SmallBODAcceptGump ) );

			AddPage( 0 );

			AddBackground( 25, 10, 430, 264, 5054 );

			AddImageTiled( 33, 20, 413, 245, 2624 );
			AddAlphaRegion( 33, 20, 413, 245 );

			AddImage( 20, 5, 10460 );
			AddImage( 430, 5, 10460 );
			AddImage( 20, 249, 10460 );
			AddImage( 430, 249, 10460 );

			AddHtmlLocalized( 190, 25, 120, 20, 1045133, 0x7FFF, false, false ); // A bulk order
			AddHtmlLocalized( 40, 48, 350, 20, 1045135, 0x7FFF, false, false ); // Ah!  Thanks for the goods!  Would you help me out?

			AddHtmlLocalized( 40, 72, 210, 20, 1045138, 0x7FFF, false, false ); // Amount to make:
			AddLabel( 250, 72, 1152, deed.AmountMax.ToString() );

			AddHtmlLocalized( 40, 96, 120, 20, 1045136, 0x7FFF, false, false ); // Item requested:
			AddItem( 385, 96, deed.Graphic );
			AddHtmlLocalized( 40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false );

			if ( deed.RequireExceptional || deed.Material != BulkMaterialType.None )
			{
				AddHtmlLocalized( 40, 144, 210, 20, 1045140, 0x7FFF, false, false ); // Special requirements to meet:

				if ( deed.RequireExceptional )
					AddHtmlLocalized( 40, 168, 350, 20, 1045141, 0x7FFF, false, false ); // All items must be exceptional.

				if ( deed.Material != BulkMaterialType.None )
					AddHtmlLocalized( 40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor( deed.Material ), 0x7FFF, false, false ); // All items must be made with x material.
			}

			AddHtmlLocalized( 40, 216, 350, 20, 1045139, 0x7FFF, false, false ); // Do you want to accept this order?

			AddButton( 100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 135, 240, 120, 20, 1006044, 0x7FFF, false, false ); // Ok

			AddButton( 275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 310, 240, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:49,代码来源:SmallBODAcceptGump.cs

示例10: InternalGump

			public InternalGump( Mobile from, HairRestylingDeed deed ) : base( 50, 50 )
			{
				m_From = from;
				m_Deed = deed;

				from.CloseGump( typeof( InternalGump ) );

				AddBackground( 100, 10, 400, 385, 0xA28 );

				AddHtmlLocalized( 100, 25, 400, 35, 1013008, false, false );
				AddButton( 175, 340, 0xFA5, 0xFA7, 0x0, GumpButtonType.Reply, 0 ); // CANCEL

				AddHtmlLocalized( 210, 342, 90, 35, 1011012, false, false );// <CENTER>HAIRSTYLE SELECTION MENU</center>

				int[][] RacialData = (from.Race == Race.Human) ? HumanArray : ElvenArray;

				for(int i=1; i<RacialData.Length; i++)
				{
					AddHtmlLocalized( LayoutArray[i][2], LayoutArray[i][3], (i==1) ? 125 : 80, (i==1) ? 70 : 35, (m_From.Female) ? RacialData[i][0] : RacialData[i][1], false, false );
					if ( LayoutArray[i][4] != 0 )
					{
						AddBackground( LayoutArray[i][0], LayoutArray[i][1], 50, 50, 0xA3C );
						AddImage( LayoutArray[i][4], LayoutArray[i][5], (m_From.Female) ? RacialData[i][4] : RacialData[i][5] );
					}
					AddButton( LayoutArray[i][6], LayoutArray[i][7], 0xFA5, 0xFA7, i, GumpButtonType.Reply, 0 );
				}
			}
开发者ID:nathanvy,项目名称:runuo,代码行数:27,代码来源:HairRestylingDeed.cs

示例11: ShowartGump

        public ShowartGump(Mobile from, int index) : base(50, 40)
        {
            from.CloseGump(typeof(ShowartGump));

            int start = index;

            m_From = from;
            m_newstart = index;

            AddPage(0);

            AddBackground(0, 0, 522, 475, 9270);
            AddBackground(11, 35, 500, 430, 3000);


            AddLabelCropped(32, 13, 150, 20, 1152, "Haazen's ShowartGump");
            AddBackground(355, 13, 60, 20, 3000);
            AddTextEntry(360, 13, 60, 20, 10, 20, "");
            AddButton(425, 13, 0x15E2, 0x15E6, 3, GumpButtonType.Reply, 0);

            AddButton(465, 14, 0x15E3, 0x15E7, 1, GumpButtonType.Reply, 0);
            AddButton(482, 14, 0x15E1, 0x15E5, 2, GumpButtonType.Reply, 0);


            AddDetails(start);
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:26,代码来源:ShowartGump.cs

示例12: Resurrect

		public static void Resurrect(Mobile m, Item item)
		{
			if (m.Alive)
			{
				return;
			}

			if (!m.InRange(item.GetWorldLocation(), ResurrectRange))
			{
				m.SendLocalizedMessage(500446); // That is too far away.
			}
			else if (m.Map != null && m.Map.CanFit(m.Location, 16, false, false))
			{
				m.CloseGump(typeof(ResurrectGump));

				/*PlayerMobile pres = m as PlayerMobile;

				if (pres.MurderBounty > 0)
					m.SendGump( new ResurrectGump( m, m, pres.MurderBounty ) );
				else*/
				m.SendGump(new ResurrectGump(m, ResurrectMessage.VirtueShrine));
			}
			else
			{
				m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:27,代码来源:Ankhs.cs

示例13: PetBallTarget

			public PetBallTarget( Mobile from, PetSkillBall ball ) :  base ( 3, false, TargetFlags.None )
			{
				m_Ball = ball;
				m_From = from;
				m_From.CloseGump( typeof( PetBallGump ) );
				from.SendMessage("Select a pet to modify their skills.");
			}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:7,代码来源:PetSkillBall.cs

示例14: SelectStyleGump

        public SelectStyleGump(Mobile owner, BoardGameControlItem controlitem) : base(450, 80)
        {
            Closable = false;

            owner.CloseGump(typeof(SelectStyleGump));

            _ControlItem = controlitem;

            if (_ControlItem.Players.IndexOf(owner) == -1)
            {
                return;
            }

            AddPage(0);
            AddBackground(0, 0, Width, Height, 0x1400);

            AddLabel(20, 60, 1152,
                "# of players (" + _ControlItem.MinPlayers + "-" + _ControlItem.MaxPlayers + "):");

            int minplayers = Math.Max(_ControlItem.MinPlayers, _ControlItem.Players.Count);

            if (_ControlItem.MaxPlayers != _ControlItem.MinPlayers && !_ControlItem.SettingsReady)
            {
                AddLabel(20, 40, 1172, "Pick the number of players");
                AddTextField(150, 60, 30, 20, 0, _ControlItem.CurrentMaxPlayers.ToString(CultureInfo.InvariantCulture));
                AddButton(182, 62, 0x4B9, 0x4BA, 500, GumpButtonType.Reply, 0);
            }
            else
            {
                AddLabel(150, 60, 1152, _ControlItem.CurrentMaxPlayers.ToString(CultureInfo.InvariantCulture));
            }


            //AddButton( Width - 15, 0, 3, 4, 0, GumpButtonType.Reply, 0 );	
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:35,代码来源:SelectStyleGump.cs

示例15: ApplyHungerStatMod

        public static void ApplyHungerStatMod(Mobile m)
        {
            if (m is PlayerMobile && m.AccessLevel == AccessLevel.Player)
            {
                m.CloseGump(typeof(HungerGump));
                m.SendGump(new HungerGump(m));
            }

            int HungerModStr = 0;

            if (m.Hunger == 0)
                HungerModStr = 0;
            else if (m.Hunger < 4)
                HungerModStr = 1;
            else if (m.Hunger < 8)
                HungerModStr = 2;
            else if (m.Hunger < 12)
                HungerModStr = 3;
            else if (m.Hunger < 16)
                HungerModStr = 4;
            else if (m.Hunger <= 20)
                HungerModStr = 5;

            m.AddStatMod(new StatMod(StatType.Str, "HungerModStr", HungerModStr, TimeSpan.Zero));
        }
开发者ID:greeduomacro,项目名称:last-wish,代码行数:25,代码来源:FoodDecay.cs


注:本文中的Mobile.CloseGump方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。