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 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; }