public AddHtmlLocalized ( int x, int y, int width, int height, int number, bool background, bool scrollbar ) : void | ||
x | int | |
y | int | |
width | int | |
height | int | |
number | int | |
background | bool | |
scrollbar | bool | |
Résultat | void |
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 }
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; }
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; }
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; } }
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 ); } }
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; }
public override void WriteToGump( Gump g, ref int y ) { m_Objective.WriteToGump( g, ref y ); base.WriteToGump( g, ref y ); if ( IsCompleted() ) { g.AddHtmlLocalized( 113, y, 312, 20, 1055121, 0xFFFFFF, false, false ); // Complete y += 16; } }
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; }
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; }
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 ); }