本文整理汇总了C#中Server.Gumps.Gump.AddHtmlLocalized方法的典型用法代码示例。如果您正苦于以下问题:C# Gump.AddHtmlLocalized方法的具体用法?C# Gump.AddHtmlLocalized怎么用?C# Gump.AddHtmlLocalized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Gumps.Gump
的用法示例。
在下文中一共展示了Gump.AddHtmlLocalized方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteToGump
public override void WriteToGump( Gump g, ref int y )
{
string amount = m_DesiredAmount.ToString();
g.AddHtmlLocalized( 98, y, 312, 16, 1072204, 0x15F90, false, false ); // Slay
g.AddLabel( 133, y, 0x481, amount );
if ( m_Name.Number > 0 )
g.AddHtmlLocalized( 133 + amount.Length * 15, y, 190, 18, m_Name.Number, 0x77BF, false, false );
else if ( m_Name.String != null )
g.AddLabel( 133 + amount.Length * 15, y, 0x481, m_Name.String );
y += 16;
#region Location
if ( m_Area != null )
{
g.AddHtmlLocalized( 103, y, 312, 20, 1018327, 0x15F90, false, false ); // Location
if ( m_Area.Name.Number > 0 )
g.AddHtmlLocalized( 223, y, 312, 20, m_Area.Name.Number, 0xFFFFFF, false, false );
else if ( m_Area.Name.String != null )
g.AddLabel( 223, y, 0x481, m_Area.Name.String );
y += 16;
}
#endregion
}
示例2: 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;
}
示例3: WriteToGump
public override void WriteToGump( Gump g, ref int y )
{
g.AddHtmlLocalized( 98, y, 312, 16, 1072206, 0x15F90, false, false ); // Escort to
if ( m_Destination.Name.Number > 0 )
g.AddHtmlLocalized( 173, y, 312, 20, m_Destination.Name.Number, 0xFFFFFF, false, false );
else if ( m_Destination.Name.String != null )
g.AddLabel( 173, y, 0x481, m_Destination.Name.String );
y += 16;
}
示例4: WriteToGump
public override void WriteToGump( Gump g, ref int y )
{
m_Objective.WriteToGump( g, ref y );
y -= 16;
if ( m_Objective.ShowDetailed )
{
base.WriteToGump( g, ref y );
g.AddHtmlLocalized( 103, y, 120, 16, 3000087, 0x15F90, false, false ); // Total
g.AddLabel( 223, y, 0x481, GetCurrentTotal().ToString() );
y += 16;
g.AddHtmlLocalized( 103, y, 120, 16, 1074782, 0x15F90, false, false ); // Return to
g.AddLabel( 223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor( Instance.QuesterType ) );
y += 16;
}
}
示例5: AddHtmlText
public static void AddHtmlText( Gump g, int x, int y, int width, int height, TextDefinition def, bool back, bool scroll, int numberColor, int stringColor )
{
if ( def == null )
return;
if ( def.m_Number > 0 )
{
if ( numberColor >= 0 ) // 5 bits per RGB component (15 bit RGB)
g.AddHtmlLocalized( x, y, width, height, def.m_Number, numberColor, back, scroll );
else
g.AddHtmlLocalized( x, y, width, height, def.m_Number, back, scroll );
}
else if ( def.m_String != null )
{
if ( stringColor >= 0 ) // 8 bits per RGB component (24 bit RGB)
g.AddHtml( x, y, width, height, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", stringColor, def.m_String ), back, scroll );
else
g.AddHtml( x, y, width, height, def.m_String, back, scroll );
}
}
示例6: WriteToGump
public override void WriteToGump( Gump g, ref int y )
{
int skillLabel = AosSkillBonuses.GetLabel( m_Skill );
string args;
if ( m_ThresholdFixed % 10 == 0 )
args = String.Format( "#{0}\t{1}", skillLabel, m_ThresholdFixed / 10 ); // as seen on OSI
else
args = String.Format( "#{0}\t{1:0.0}", skillLabel, (double)m_ThresholdFixed / 10 ); // for non-integer skill levels
g.AddHtmlLocalized( 98, y, 312, 16, 1077485, args, 0x15F90, false, false ); // Increase ~1_SKILL~ to ~2_VALUE~
y += 16;
}
示例7: 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;
}
示例8: WriteTimeRemaining
public static void WriteTimeRemaining( Gump g, ref int y, TimeSpan timeRemaining )
{
g.AddHtmlLocalized( 103, y, 120, 16, 1062379, 0x15F90, false, false ); // Est. time remaining:
g.AddLabel( 223, y, 0x481, timeRemaining.TotalSeconds.ToString( "F0" ) );
y += 16;
}
示例9: AddHtmlText
public static void AddHtmlText( Gump g, int x, int y, int width, int height, TextDefinition text, bool back, bool scroll, int numberColor, int stringColor )
{
if( text != null && text.Number > 0 )
if( numberColor >= 0 )
g.AddHtmlLocalized( x, y, width, height, text.Number, numberColor, back, scroll );
else
g.AddHtmlLocalized( x, y, width, height, text.Number, back, scroll );
else if( text != null && text.String != null )
if( stringColor >= 0 )
g.AddHtml( x, y, width, height, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", stringColor, text.String ), back, scroll );
else
g.AddHtml( x, y, width, height, text.String, back, scroll );
}