Exemplo n.º 1
0
    bool DrawBox(string content, CleanLog.LogType boxType, bool isOdd, bool isSelected)
    {
        if (isSelected)
        {
            boxStyle.normal.background = boxBgSelected;
        }
        else
        {
            boxStyle.normal.background = isOdd ? boxBgOdd : boxBgEven;
        }

        switch (boxType)
        {
        case CleanLog.LogType.Exception:
        case CleanLog.LogType.Assert:
        case CleanLog.LogType.Error:
            icon = errorIcon;
            break;

        case CleanLog.LogType.Warning:
            icon = warningIcon;
            break;

        case CleanLog.LogType.Info:
        default:
            icon = infoIcon;
            break;
        }

        return(GUILayout.Button(new GUIContent(content, icon), boxStyle, GUILayout.ExpandWidth(true), GUILayout.Height(30)));
    }
Exemplo n.º 2
0
 public LogEntry(CleanLog.LogType logType, string message, Enum tag, StackFrame[] stackFrame)
 {
     LogType     = logType;
     Message     = message;
     LogTag      = tag;
     StackFrames = stackFrame;
 }