コード例 #1
0
        public static AndroidLogcatTagWindow Show(AndroidLogcatTagsControl tagControl)
        {
            if (s_TagWindow == null)
            {
                s_TagWindow = ScriptableObject.CreateInstance <AndroidLogcatTagWindow>();
            }

            s_TagWindow.m_TagControl = tagControl;
            s_TagWindow.titleContent = new GUIContent("Tag Control");
            s_TagWindow.Show();
            s_TagWindow.Focus();

            return(s_TagWindow);
        }
コード例 #2
0
        public void TagSelected(object userData, string[] options, int selectedIndex)
        {
            bool tagWindowSelected = false;

            if (selectedIndex == (int)AndroidLogcatTagType.AllTags)
            {
                // Deselect *No Filter* and select all others.
                UpdateTagFilterBasedOnNoFilterOption(false);
            }
            else if (selectedIndex == (int)AndroidLogcatTagType.NoFilter)
            {
                if (!m_SelectedTags[(int)AndroidLogcatTagType.NoFilter])
                {
                    // Select *No Filter*, deselect all others.
                    UpdateTagFilterBasedOnNoFilterOption(true);
                }
                else
                {
                    // Deselect *No Filter*, select all others.
                    UpdateTagFilterBasedOnNoFilterOption(false);
                }
            }
            else if (selectedIndex == (int)AndroidLogcatTagType.TagControl)
            {
                tagWindowSelected = true;
                m_TagWindow       = AndroidLogcatTagWindow.Show(this);
            }
            else
            {
                m_SelectedTags[selectedIndex] = !m_SelectedTags[selectedIndex];
                m_SelectedTags[(int)AndroidLogcatTagType.NoFilter] = !(GetSelectedTags(true).Length > 0);
            }

            if (tagWindowSelected)
            {
                return;
            }

            if (m_TagWindow != null)
            {
                m_TagWindow.Repaint();
            }

            if (TagSelectionChanged != null)
            {
                TagSelectionChanged.Invoke();
            }
        }