OnGUI() public méthode

public OnGUI ( Rect rect, GUIContent guiContent, bool animate, GUIStyle style ) : bool
rect UnityEngine.Rect
guiContent UnityEngine.GUIContent
animate bool
style UnityEngine.GUIStyle
Résultat bool
Exemple #1
0
        void DoCollabDropDown(Rect rect)
        {
            UpdateCollabToolbarState();
            bool showPopup = requestShowCollabToolbar;

            requestShowCollabToolbar = false;

            bool enable = !EditorApplication.isPlaying;

            using (new EditorGUI.DisabledScope(!enable))
            {
                bool animate = m_CollabToolbarState == CollabToolbarState.InProgress;

                EditorGUIUtility.SetIconSize(new Vector2(12, 12));
                if (m_CollabButton.OnGUI(rect, currentCollabContent, animate, Styles.collabButtonStyle))
                {
                    showPopup = true;
                }
                EditorGUIUtility.SetIconSize(Vector2.zero);
            }

            if (showPopup)
            {
                ShowPopup(rect);
            }
        }