Exemple #1
0
 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)
     }));
 }
Exemple #2
0
        /// <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);
        }
Exemple #3
0
 public ChatlineObject(string input, ChatlineColor color) : this()
 {
     ChatFragments.Add(new ChatlineFragment(input, color));
 }
 public ChatlineFragment(string text, ChatlineColor color)
 {
     Text  = text;
     Color = color.ToString();
 }