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; }
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); }
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; } }
public void SetParent(StackedLog log) { Parent = log; log.Children.Add(this); }