public override void OnGUI()
        {
            EditorGUI.BeginChangeCheck();

            EditorGUILayout.Space();
            EditorGUILayout.HelpBox(DESCRIBTION, MessageType.Info);


            using (new SA_WindowBlockWithIndent(new GUIContent("Settings"))) {
                m_state.DisplayCollapse     = SA_EditorGUILayout.ToggleFiled("Collapse Button", m_state.DisplayCollapse, SA_StyledToggle.ToggleType.EnabledDisabled);
                m_state.DisplayClearOnPlay  = SA_EditorGUILayout.ToggleFiled("Clear On Play Button", m_state.DisplayClearOnPlay, SA_StyledToggle.ToggleType.EnabledDisabled);
                m_state.DisplayPauseOnError = SA_EditorGUILayout.ToggleFiled("Error Pause Button", m_state.DisplayPauseOnError, SA_StyledToggle.ToggleType.EnabledDisabled);

                m_state.DisplaySearchBar = SA_EditorGUILayout.ToggleFiled("Search Bar", m_state.DisplaySearchBar, SA_StyledToggle.ToggleType.EnabledDisabled);
                m_state.RichText         = SA_EditorGUILayout.ToggleFiled("Rich Text", m_state.RichText, SA_StyledToggle.ToggleType.EnabledDisabled);
            }


            using (new SA_WindowBlockWithIndent(new GUIContent("Tags"))) {
                EditorGUILayout.BeginVertical(GUILayout.ExpandWidth(true)); {
                    ReorderableListGUI.ListField(UCL_Settings.Instance.Tags,
                                                 (Rect position, UCL_ConsoleTag tag) => {
                        position.x -= 15;

                        int dockedToggleWidth = 40;
                        Rect labelRect        = new Rect(position);
                        labelRect.width       = position.width - dockedToggleWidth;

                        EditorGUI.LabelField(labelRect, tag.DisaplyContent);

                        Rect docedRect  = new Rect(position);
                        docedRect.x     = labelRect.x + labelRect.width;
                        docedRect.width = dockedToggleWidth;

                        bool docked = m_state.IsTagDocked(tag);
                        docked      = EditorGUI.Toggle(docedRect, docked);

                        m_state.SetTagDockedState(tag, docked);

                        return(tag);
                    },
                                                 () => {
                    },
                                                 ReorderableListFlags.HideAddButton | ReorderableListFlags.HideRemoveButtons
                                                 );
                } EditorGUILayout.EndVertical();
            }


            if (EditorGUI.EndChangeCheck())
            {
                UCL_Settings.SaveConsoleWindowState(m_state);
            }
        }
        private void DrawToolbar()
        {
            GUILayout.BeginHorizontal(EditorStyles.toolbar);
            {
                bool clear = GUILayout.Button("Clear", EditorStyles.toolbarButton);
                if (clear)
                {
                    UCL_LogEntries.Clear();
                }

                GUILayout.Space(6);


                bool val = false;
                if (m_state.DisplayCollapse)
                {
                    val = UCL_LogEntries.HasFlag(UCL_ConsoleFlags.Collapse);
                    val = GUILayout.Toggle(val, "Collapse", EditorStyles.toolbarButton);
                    UCL_LogEntries.SetFlag(UCL_ConsoleFlags.Collapse, val);
                }

                if (m_state.DisplayClearOnPlay)
                {
                    val = UCL_LogEntries.HasFlag(UCL_ConsoleFlags.ClearOnPlay);
                    val = GUILayout.Toggle(val, "Clear on Play", EditorStyles.toolbarButton);
                    UCL_LogEntries.SetFlag(UCL_ConsoleFlags.ClearOnPlay, val);
                }

                if (m_state.DisplayPauseOnError)
                {
                    val = UCL_LogEntries.HasFlag(UCL_ConsoleFlags.ErrorPause);
                    val = GUILayout.Toggle(val, "Error Pause", EditorStyles.toolbarButton);
                    UCL_LogEntries.SetFlag(UCL_ConsoleFlags.ErrorPause, val);
                }


                if (UnDockedUsedTagsCount > 0)
                {
                    if (GUILayout.Button("Tags (" + UnDockedUsedTagsCount + ")", EditorStyles.toolbarDropDown))
                    {
                        GenericMenu toolsMenu = new GenericMenu();

                        foreach (var pair in m_tagsMessagesCount)
                        {
                            var tag = UCL_Settings.Instance.GetTag(pair.Key);
                            if (m_state.IsTagDocked(tag))
                            {
                                continue;
                            }

                            bool enabled = m_state.IsTagEnabled(tag);
                            toolsMenu.AddItem(new GUIContent(tag.Name + " (" + pair.Value + ")"), enabled, () => {
                                enabled = !enabled;
                                m_state.SetTagEnabledState(tag, enabled);
                                UCL_Settings.SaveConsoleWindowState(m_state);
                            });
                        }
                        toolsMenu.ShowAsContext();
                    }
                }


                GUILayout.FlexibleSpace();
                if (m_state.DisplaySearchBar)
                {
                    GUILayout.BeginHorizontal(m_toolbarStyle);
                    {
                        GUI.SetNextControlName(SEARCH_BAR_CONTROL_NAME);
                        m_searchString = EditorGUILayout.TextField(m_searchString, m_toolbarSearchTextFieldStyle, GUILayout.MinWidth(200f));

                        if (GUILayout.Button("", m_toolbarSearchCancelButtonStyle))
                        {
                            m_searchString = "";
                            GUI.FocusControl(null);
                        }

                        m_logsView.SerSearthcString(m_searchString);
                    }
                    GUILayout.EndHorizontal();
                }


                for (int i = UCL_Settings.Instance.Tags.Count - 1; i >= 0; i--)
                {
                    var tag = UCL_Settings.Instance.Tags[i];
                    //just a stupid workaround we have to make
                    // since gui list plgun an add a null balue to the tags list just for a second
                    if (tag == null)
                    {
                        continue;
                    }
                    if (m_state.IsTagDocked(tag))
                    {
                        var content = new GUIContent(GetMessagesCountForTag(tag.Name).ToString(), tag.Icon);

                        EditorGUI.BeginChangeCheck();
                        bool enabled = GUILayout.Toggle(m_state.IsTagEnabled(tag), content, EditorStyles.toolbarButton);
                        if (EditorGUI.EndChangeCheck())
                        {
                            m_state.SetTagEnabledState(tag, enabled);
                            UCL_Settings.SaveConsoleWindowState(m_state);
                        }
                    }
                }
            }
            GUILayout.EndHorizontal();
        }