public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            var labelPosition = position;

            labelPosition.width = EditorGUIUtility.labelWidth;

            var previewPosition = position;

            previewPosition.width = 100f;
            previewPosition.x     = position.x + position.width - previewPosition.width;

            var fieldPosition = position;

            fieldPosition.width -= labelPosition.width + previewPosition.width;
            fieldPosition.x     += labelPosition.width;

            EditorGUI.LabelField(labelPosition, label);
            var value = property.hasMultipleDifferentValues == true ? "-" : property.enumDisplayNames[property.enumValueIndex];

            if (this.item == null)
            {
                this.item = new TweenerEasePopupWindow.Item((Ease.Type)property.enumValueIndex);
            }

            if (this.editor == null)
            {
                this.editor = Editor.CreateEditor(property.serializedObject.targetObjects);
            }

            this.item.OnGUI(previewPosition);

            if (GUI.enabled == true && Event.current.type == EventType.Repaint)
            {
                if (position.Contains(Event.current.mousePosition) == true)
                {
                    this.item.Play();
                }
                else
                {
                    this.item.Pause();
                }
            }

            this.editor.Repaint();

            if (GUI.Button(fieldPosition, value, EditorStyles.popup) == true)
            {
                var offset = new Vector2(0f, 0f);
                var rect   = fieldPosition;
                var vector = GUIUtility.GUIToScreenPoint(new Vector2(fieldPosition.x, fieldPosition.y));
                rect.x = vector.x;
                rect.y = vector.y;

                var popup = TweenerEasePopupWindow.Create(new Rect(rect.x + offset.x, rect.y + rect.height + offset.y, rect.width - offset.x, 300f), (newType) => {
                    property.enumValueIndex = (int)newType;
                    property.serializedObject.ApplyModifiedProperties();
                    this.item = null;
                });
                popup.ShowAsDropDown();
            }
        }
 public void OnGUI(Rect rect)
 {
     TweenerEasePopupWindow.DrawProgress(rect, this.transition, (float)this.progress, this.GetCaption());
 }