Ejemplo n.º 1
0
        public void ConsoleEntryAdded(string logEntry, ConsoleEntryType entryType)
        {
            string formattedEntry = FormatInputString(logEntry, entryType) + "\n";

            m_formattedMessagesQueue.Enqueue(formattedEntry);
            m_logTextField.text += formattedEntry;
            m_debuggerView.ScrollToBottom();
        }
Ejemplo n.º 2
0
        public void AddEntryToLog(string logEntry, ConsoleEntryType entryType)
        {
            m_consoleView.ConsoleEntryAdded(logEntry, entryType);

            m_consoleLogEntries.Enqueue(logEntry);

            if (m_consoleLogEntries.Count > m_debugSettings.LogBufferSize)
            {
                m_consoleLogEntries.Dequeue();
                m_consoleView.ConsoleQueueExceeded();
            }
        }
Ejemplo n.º 3
0
        private Color GetColorFromConsoleEntry(ConsoleEntryType entryType)
        {
            switch (entryType)
            {
            case ConsoleEntryType.Error:
                return(m_debugSettings.ErrorMessageColor);

            case ConsoleEntryType.Warning:
                return(m_debugSettings.WarningMessageColor);

            case ConsoleEntryType.ConsoleMessage:
                return(m_debugSettings.ConsoleMessageColor);

            case ConsoleEntryType.UserInput:
                return(m_debugSettings.UserEntryColor);

            default: return(m_debugSettings.ConsoleMessageColor);
            }
        }
Ejemplo n.º 4
0
 public ConsoleEntry(string description, ConsoleEntryType entryType)
 {
     Description = description;
     EntryType   = entryType;
 }
Ejemplo n.º 5
0
        private string FormatInputString(string inputString, ConsoleEntryType entryType)
        {
            string colorHex = "#" + ColorUtility.ToHtmlStringRGB(GetColorFromConsoleEntry(entryType));

            return($"<color={colorHex}>> {inputString}</color>");
        }
 public ConsoleLine(ConsoleEntryType type, string value) {
     this.Type = type;
     this.Value = value;
 }
 public ConsoleLine(ConsoleEntryType type) {
     this.Type = type;
 }
 public ConsoleLine(ConsoleEntryType type, string value)
 {
     this.Type  = type;
     this.Value = value;
 }
 public ConsoleLine(ConsoleEntryType type)
 {
     this.Type = type;
 }