public ChatlineObject BuildChatLine(string prefix, string text, ChatlineColor prefixColor, ChatlineColor textColor = ChatlineColor.White) { return(new ChatlineObject(new List <ChatlineFragment>() { new ChatlineFragment(prefix, prefixColor), new ChatlineFragment(text, textColor) })); }
/// <summary> /// Builds a simple chat text with the specified colors /// </summary> /// <param name="p"></param> /// <param name="perfix"></param> /// <param name="text"></param> /// <param name="chatlineColor"></param> public void SendSimpleChat(Player p, string prefix, string text, ChatlineColor prefixColor, ChatlineColor textColor = ChatlineColor.White) { var chat = new OutboundChatMessage(p, BuildChatLine(prefix, text, prefixColor, textColor)); SendChatToPlayer(chat); }
public ChatlineObject(string input, ChatlineColor color) : this() { ChatFragments.Add(new ChatlineFragment(input, color)); }
public ChatlineFragment(string text, ChatlineColor color) { Text = text; Color = color.ToString(); }