Fixes string interpolation
This commit is contained in:
parent
42d0b6271f
commit
7d3a0ca265
233 changed files with 758 additions and 690 deletions
|
|
@ -178,12 +178,12 @@ namespace Server.Gumps
|
|||
|
||||
public string Center( string text )
|
||||
{
|
||||
return String.Format( "<CENTER>{0}</CENTER>", text );
|
||||
return $"<CENTER>{text}</CENTER>";
|
||||
}
|
||||
|
||||
public string Color( string text, int color )
|
||||
{
|
||||
return String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, text );
|
||||
return $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
}
|
||||
|
||||
public ClientGump( Mobile from, NetState state, string initialText ) : base( 30, 20 )
|
||||
|
|
@ -232,10 +232,10 @@ namespace Server.Gumps
|
|||
if ( m != null )
|
||||
{
|
||||
AddHtml( 14, 36 + (line * 20), 200, 20, Color( "Mobile:", LabelColor32 ), false, false );
|
||||
AddHtml( 70, 36 + (line++ * 20), 200, 20, Color( String.Format( "{0} (0x{1:X})", m.Name, m.Serial.Value ), LabelColor32 ), false, false );
|
||||
AddHtml( 70, 36 + (line++ * 20), 200, 20, Color($"{m.Name} (0x{m.Serial.Value:X})", LabelColor32 ), false, false );
|
||||
|
||||
AddHtml( 14, 36 + (line * 20), 200, 20, Color( "Location:", LabelColor32 ), false, false );
|
||||
AddHtml( 70, 36 + (line++ * 20), 200, 20, Color( String.Format( "{0} [{1}]", m.Location, m.Map ), LabelColor32 ), false, false );
|
||||
AddHtml( 70, 36 + (line++ * 20), 200, 20, Color($"{m.Location} [{m.Map}]", LabelColor32 ), false, false );
|
||||
|
||||
AddButton( 13, 157, 0xFAB, 0xFAD, 1, GumpButtonType.Reply, 0 );
|
||||
AddHtml( 48, 158, 200, 20, Color( "Send Message", LabelColor32 ), false, false );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue