Ejemplo n.º 1
0
    private void OnEnable()
    {
        errorIcon   = EditorGUIUtility.Load("icons/console.erroricon.png") as Texture2D;
        warningIcon = EditorGUIUtility.Load("icons/console.warnicon.png") as Texture2D;
        infoIcon    = EditorGUIUtility.Load("icons/console.infoicon.png") as Texture2D;

        errorIconSmall   = EditorGUIUtility.Load("icons/console.erroricon.sml.png") as Texture2D;
        warningIconSmall = EditorGUIUtility.Load("icons/console.warnicon.sml.png") as Texture2D;
        infoIconSmall    = EditorGUIUtility.Load("icons/console.infoicon.sml.png") as Texture2D;

        resizerStyle = new GUIStyle();
        resizerStyle.normal.background = EditorGUIUtility.Load("icons/d_AvatarBlendBackground.png") as Texture2D;

        boxStyle = new GUIStyle();
        boxStyle.normal.textColor = new Color(0.7f, 0.7f, 0.7f);

        boxBgOdd      = EditorGUIUtility.Load("builtin skins/darkskin/images/cn entrybackodd.png") as Texture2D;
        boxBgEven     = EditorGUIUtility.Load("builtin skins/darkskin/images/cnentrybackeven.png") as Texture2D;
        boxBgSelected = EditorGUIUtility.Load("builtin skins/darkskin/images/menuitemhover.png") as Texture2D;

        textAreaStyle = new GUIStyle();
        textAreaStyle.normal.textColor  = new Color(0.9f, 0.9f, 0.9f);
        textAreaStyle.normal.background = EditorGUIUtility.Load("builtin skins/darkskin/images/projectbrowsericonareabg.png") as Texture2D;

        logs            = new List <StackedLog>();
        selectedLog     = null;
        previousTabSize = 0;
        Window          = this;
        //Application.logMessageReceived += LogMessageReceived;
    }
Ejemplo n.º 2
0
    public void TagRemoved(string tag, List <string> taglogs)
    {
        taglogs.Reverse();
        StackedLog l = new StackedLog(false, tag, taglogs != null ? string.Join("\n", taglogs) : "", LogType.Log);

        logs.Add(l);
    }
Ejemplo n.º 3
0
    private void DrawLog(StackedLog log, bool oddLine, int tabSize)
    {
        if (DrawBox(log.info, log.type, oddLine, log.isSelected, tabSize))
        {
            if (selectedLog != null)
            {
                selectedLog.isSelected = false;
            }

            log.isSelected = true;
            selectedLog    = log;
            GUI.changed    = true;
        }
    }
Ejemplo n.º 4
0
 public void SetParent(StackedLog log)
 {
     Parent = log;
     log.Children.Add(this);
 }