Exemplo n.º 1
0
        private void ProcessReceivedMessages()
        {
            if (Enabled)
            {
                while (NewChatMessages.TryDequeue(out var chatMsg))
                {
                    NewMessageReceived = true;

                    if (!ChatWindow.Singleton.Display)
                    {
                        LunaScreenMsg.PostScreenMessage($"{chatMsg.Item1}: {chatMsg.Item2}", 5f, ScreenMessageStyle.UPPER_LEFT);
                    }
                    else
                    {
                        ChatWindow.Singleton.ScrollToBottom();
                    }

                    ChatMessages.Enqueue(chatMsg);
                }
            }
        }