本文整理汇总了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;
}
示例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.");
}
示例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;
}
示例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);
}