remove use of Tuple in chat

This commit is contained in:
Chris Forbes
2010-05-12 18:44:54 +12:00
parent 72213adb45
commit 29277d01d2
2 changed files with 9 additions and 7 deletions

View File

@@ -29,7 +29,7 @@ namespace OpenRA
{
const int logLength = 10;
public List<Tuple<Color, string, string>> recentLines = new List<Tuple<Color, string, string>>();
public List<ChatLine> recentLines = new List<ChatLine>();
public string typing = "";
public bool isChatting = true;
@@ -68,10 +68,12 @@ namespace OpenRA
public void AddLine(Color c, string from, string text)
{
recentLines.Add(Tuple.New(c, from, text));
recentLines.Add(new ChatLine { Color = c, Owner = from, Text = text });
var eva = Rules.Info["world"].Traits.Get<EvaAlertsInfo>();
Sound.Play(eva.ChatBeep);
while (recentLines.Count > logLength) recentLines.RemoveAt(0);
}
}
class ChatLine { public Color Color = Color.White; public string Owner, Text; }
}