Exemplo n.º 1
0
        public override void OnGUI(Rect rect)
        {
            GUIStyle collabButtonStyle = "AppCommand";
            var      disable           = EditorApplication.isPlaying;

            using (new EditorGUI.DisabledScope(disable))
            {
                if (m_CurrentState == ToolbarButtonState.Plastic)
                {
                    var icon = GetIconForPlastic(PlasticWindow.HasNotification);
                    EditorGUIUtility.SetIconSize(new Vector2(16, 16));
                    if (GUI.Button(rect, icon, collabButtonStyle))
                    {
                        PlasticWindow.Open();
                    }
                    EditorGUIUtility.SetIconSize(Vector2.zero);
                }
                else
                {
                    var icon = GetIconForState();
                    EditorGUIUtility.SetIconSize(new Vector2(16, 16));
                    if (GUI.Button(rect, icon, collabButtonStyle))
                    {
                        CollaborateWindow.Init();
                    }
                    EditorGUIUtility.SetIconSize(Vector2.zero);
                }
            }
        }
Exemplo n.º 2
0
        public override void OnGUI(Rect rect)
        {
            GUIStyle collabButtonStyle = "AppCommand";
            var      disable           = EditorApplication.isPlaying;

            using (new EditorGUI.DisabledScope(disable))
            {
                var icon = GetIconForState();
                EditorGUIUtility.SetIconSize(new Vector2(16, 16));
                if (GUI.Button(rect, icon, collabButtonStyle))
                {
                    CollaborateWindow.Init();
                }
                EditorGUIUtility.SetIconSize(Vector2.zero);
            }
        }