public void Update(List <Sprite> sprites)
        {
            if (!IsDebuging)
            {
                return;
            }

            MaxLogVec = Vector2.Zero;
            for (int i = 0; i < EventLogList.Count; i++)
            {
                EventLogList[i].Update();
                if (EventLogList[i].IsRemove)
                {
                    EventLogList.RemoveAt(i);
                    continue;
                }
                Vector2 temp = Fonts["Default"].MeasureString(EventLogList[i].Text);
                if (temp.X > MaxLogVec.X)
                {
                    MaxLogVec = new Vector2(temp.X, 0);
                }
            }

            BuildDebugMessage(sprites);
            OutlineDebugMessageTexture = textureManager.OutlineText(debugMessage.ToString(), "Default", Color.Black, Color.White, 0);
        }
 public void AddEvent(object e, KeyboardUtils keyboardUtils)
 {
     if (EventLogList.Count > 10)
     {
         EventLogList.RemoveAt(0);
     }
     if (e is KeysArray)
     {
         EventLogList.Add(new LogElement(e.ToString()));
     }
     if (e is string)
     {
         EventLogList.Add(new LogElement(e as string));
     }
 }
        public void AddEvent(object e)
        {
            if (EventLogList.Count > 10)
            {
                EventLogList.RemoveAt(0);
            }
            switch (e)
            {
            case KeysArray k:
                EventLogList.Add(new LogElement(k.ToString()));
                break;

            case string s:
                EventLogList.Add(new LogElement(s.ToString()));
                break;

            default:
                EventLogList.Add(new LogElement(e.ToString()));
                break;
            }
        }