//------------------------------------------------- #region Constructors Region /// <summary> /// Create a new instance of <see cref="ChatElement"/>. /// </summary> /// <param name="myRes"> /// the woto resources component manager object. /// it will be from game client of the game. /// </param> private ChatElement(IRes myRes, GameControls.ChatBackgroundLabel chatBackgroundLabel, ChatMessage message) : base(myRes) { ChatBackgroundLabel = chatBackgroundLabel; Message = message; IsMe = Message.SenderName == ThereIsServer.GameObjects.MyProfile.PlayerName; /* WARNING: * about StartPoint of the element: * the start point should be default, then you should set it * in the background label, considering other elements' * start point. */ StartPointF = default; InitializeComponent(); }
//------------------------------------------------- #region Constructors Region private ChatManager(ChatChannels channel, GameControls.ChatBackgroundLabel father) { Channel = channel; Father = father; }
//------------------------------------------------- #region static methods Region public static ChatElement GenerateChatElement(IRes myRes, GameControls.ChatBackgroundLabel chatBackgroundLabel, ChatMessage message) { return(new ChatElement(myRes, chatBackgroundLabel, message)); }