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


C# Gump.AddItem方法代码示例

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


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

示例1: WriteToGump

		public override void WriteToGump( Gump g, ref int y )
		{
			if ( ShowDetailed )
			{
				string amount = m_DesiredAmount.ToString();

				g.AddHtmlLocalized( 98, y, 350, 16, 1072205, 0x15F90, false, false ); // Obtain
				g.AddLabel( 143, y, 0x481, amount );

				if ( m_Name.Number > 0 )
				{
					g.AddHtmlLocalized( 143 + amount.Length * 15, y, 190, 18, m_Name.Number, 0x77BF, false, false );
					g.AddItem( 350, y, LabelToItemID( m_Name.Number ) );
				}
				else if ( m_Name.String != null )
				{
					g.AddLabel( 143 + amount.Length * 15, y, 0x481, m_Name.String );
				}
			}
			else
			{
				if ( m_Name.Number > 0 )
					g.AddHtmlLocalized( 98, y, 312, 32, m_Name.Number, 0x15F90, false, false );
				else if ( m_Name.String != null )
					g.AddLabel( 98, y, 0x481, m_Name.String );
			}

			y += 32;
		}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:29,代码来源:CollectObjective.cs

示例2: BaseSkinByType

		internal void BaseSkinByType(Gump g)
		{
			if (relplug == null)
			{ SkillSettings.DoTell("Base Type is invalid. Cannot skin."); }
			g.AddPage(0);
			string switchby = relplug.getGumpType();
			if (switchby == "Control")
			{
				//this.X = sk.GetCoord("Control", "X", sk ); this.Y = sk.SelectionY;
				g.X = 0; g.Y = 0;
				if (!Skin.WindowInfo.ContainsKey("Control"))
				{ SkillSettings.DoTell("No key for Control gump skin."); return; }
				WindowInfo inf = Skin.WindowInfo["Control"];
				g.X = inf.X; g.Y = inf.Y;
				//this.AddBackground(sk.GetCoord("Control", "X", sk ), sk.SelectionY, sk.GetCoord("Control", "W", sk ), sk.GetCoord("Control", "H", sk ), sk.SelectBGID);				
				g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
				g.AddImageTiled(Skin.BarSHX, Skin.BarSHY, Skin.BarSHW, Skin.BarSHH, Skin.SelectLineH);
				g.AddHtml(Skin.TMSSX, Skin.TMSSY, 140, 20, "<basefont size=5 face=1 color=#CC0000><Center>TMSS - //4// -</center></basefont>", false, false);
				//<basefont size=5 face=1 color=#CC0000><Center>TM Skill & Stat System v3.0</center></basefont>								
			}
			else if (switchby == "Master")
			{
				g.X = 0; g.Y = 0;
				if (!Skin.WindowInfo.ContainsKey("Master"))
				{ SkillSettings.DoTell("No key for Master gump skin."); return; }
				WindowInfo inf = Skin.WindowInfo["Master"];				
				//this.AddBackground(sk.MasterX, sk.MasterY, sk.MasterW, sk.MasterH, sk.MasterBGID);
				g.X = inf.X; g.Y = inf.Y;
				g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
				g.AddImageTiled(Skin.BarMHX, Skin.BarMHY, Skin.BarMHW, Skin.BarMHH, Skin.MasterLineH);
				g.AddImageTiled(Skin.BarMVX, Skin.BarMVY, Skin.BarMVW, Skin.BarMVH, Skin.MasterLineV);
				g.AddItem(Skin.IconMX, Skin.IconMY, Skin.IconMID, Skin.IconMColor);				
			}
			else if (switchby == "Underbar")
			{
				g.X = 0; g.Y = 0;
				if (!Skin.WindowInfo.ContainsKey("Underbar"))
				{ SkillSettings.DoTell("No key for Underbar gump skin."); return; }
				WindowInfo inf = Skin.WindowInfo["Underbar"];
				g.X = inf.X; g.Y = inf.Y;
				g.AddBackground(0, 0, inf.W, inf.H, inf.bgID);
				//this.AddBackground(sk.sk.GetCoord("Underbar", "X", );, sk.sk.GetCoord("Underbar", "Y", );, sk.HelpW, sk.HelpH, sk.HelpBGID);				
			}
			else SkillSettings.DoTell("Unknown Gump Type. Cannot apply base skin.");
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:45,代码来源:ControlBasePages.cs

示例3: WriteToGump

		public override void WriteToGump( Gump g, ref int y )
		{
			string amount = m_Amount.ToString();

			g.AddHtmlLocalized( 98, y, 312, 16, 1072207, 0x15F90, false, false ); // Deliver
			g.AddLabel( 143, y, 0x481, amount );

			if ( m_Name.Number > 0 )
			{
				g.AddHtmlLocalized( 143 + amount.Length * 15, y, 190, 18, m_Name.Number, 0x77BF, false, false );
				g.AddItem( 350, y, CollectObjective.LabelToItemID( m_Name.Number ) );
			}
			else if ( m_Name.String != null )
			{
				g.AddLabel( 143 + amount.Length * 15, y, 0x481, m_Name.String );
			}

			y += 32;

			g.AddHtmlLocalized( 103, y, 120, 16, 1072379, 0x15F90, false, false ); // Deliver to
			g.AddLabel( 223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor( m_Destination ) );

			y += 16;
		}
开发者ID:nathanvy,项目名称:runuo,代码行数:24,代码来源:DeliverObjective.cs

示例4: AddItemCentered

 public static void AddItemCentered(int x, int y, int w, int h, int itemID, Gump gump)
 {
     Rectangle2D r = ItemBounds.Table[itemID];
     gump.AddItem(x + ((w - r.Width) / 2) - r.X, y + ((h - r.Height) / 2) - r.Y, itemID);
 }
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:5,代码来源:NewAuctionGump.cs


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