public void DrawCategoryButtons(LoggerEditor logEditor) { logEditor.SetIconToType(true, lowestLogType); categoryContent.image = logEditor.icon; GUI.backgroundColor = categoryColour; enabled = GUILayout.Toggle(enabled, categoryContent, EditorStyles.toolbarButton, GUILayout.Width(EditorStyles.toolbarButton.CalcSize(categoryContent).x)); GUI.backgroundColor = Color.white; }
public void AddLog(LoggerEditor logEditor, Logger.LoggerLog logToAdd) { logCount++; categoryContent.image = logEditor.icon; categoryContent.text = category + " (" + logCount + ")"; if (logToAdd.logType < lowestLogType) { lowestLogType = logToAdd.logType; } }
public void DrawLog(bool isOdd, LoggerEditor logEditor) { if (!logEditor.showLog && logType == LogType.Log) { return; } if (!logEditor.showWarnings && logType == LogType.Warning) { return; } if (!logEditor.showErrors && logType == LogType.Error) { return; } if (logEditor.selected == this) { logEditor.boxStyle.normal.background = logEditor.boxBgSelected; } else { if (isOdd) { logEditor.boxStyle.normal.background = logEditor.boxBgOdd; } else { logEditor.boxStyle.normal.background = logEditor.boxBgEven; } } logEditor.SetIconToType(false, logType); logGUI.image = logEditor.icon; GUI.backgroundColor = logCategory.categoryColour; if (GUILayout.Button(logGUI, logEditor.boxStyle, GUILayout.ExpandWidth(true), GUILayout.Height(logEditor.boxStyle.CalcSize(logGUI).y))) { logEditor.selected = this; } GUI.backgroundColor = Color.white; }
static void Init() { LoggerEditor window = (LoggerEditor)EditorWindow.GetWindow(typeof(LoggerEditor)); window.Show(); }