コード例 #1
0
ファイル: Mobile.cs プロジェクト: uotools/PlayUO
 public void AddTextMessage(string Name, string Message, IFont Font, IHue Hue, bool unremovable)
 {
     if (!this.m_Ignored && (!Message.StartsWith("[Party]->[") || (Message.IndexOf("KUOC_") < 0)))
     {
         if ((Font is Font) && Message.StartsWith("(Guard, "))
         {
             this.m_IsFactionGuard = true;
         }
         string text = null;
         if (Name.Length > 0)
         {
             text = Name + ": " + Message;
         }
         else
         {
             text = Message;
         }
         if (Message.Length > 0)
         {
             Engine.AddToJournal(new JournalEntry(text, Hue, this.m_Serial));
             Message = Engine.WrapText(Message, 200, Font).TrimEnd(new char[0]);
             if (Message.Length > 0)
             {
                 MessageManager.AddMessage(new GDynamicMessage(unremovable, this, Message, Font, Hue));
             }
         }
     }
 }
コード例 #2
0
        public void AddTextMessage(string Name, string Message, IFont Font, IHue Hue, bool unremovable)
        {
            this.m_LastTextHue = Hue;
            this.m_LastText    = Message;
            string text = null;

            if (Name.Length > 0)
            {
                text = Name + ": " + Message;
            }
            else
            {
                text = Message;
            }
            if (Message.Length > 0)
            {
                Engine.AddToJournal(new JournalEntry(text, Hue, this.m_Serial));
                Message = Engine.WrapText(Message, 200, Font).TrimEnd(new char[0]);
                if (Message.Length > 0)
                {
                    MessageManager.AddMessage(new GDynamicMessage(unremovable, this, Message, Font, Hue));
                }
            }
        }