UnityEditor.PopupWindowWithoutFocus.Show C# (CSharp) Method

Show() public static method

public static Show ( Rect activatorRect, PopupWindowContent windowContent ) : void
activatorRect UnityEngine.Rect
windowContent PopupWindowContent
return void
        public static void Show(Rect activatorRect, PopupWindowContent windowContent)
        {
            Show(activatorRect, windowContent, null);
        }

Same methods

PopupWindowWithoutFocus::Show ( Rect activatorRect, PopupWindowContent windowContent, PopupLocationHelper locationPriorityOrder ) : void

Usage Example

示例#1
0
        // when current event is mouse click, this function pings the object, or
        // if shift/control is pressed and object is a texture, pops up a large texture
        // preview window
        internal static void PingObjectOrShowPreviewOnClick(Object targetObject, Rect position)
        {
            if (targetObject == null)
            {
                return;
            }

            Event evt = Event.current;
            // ping object
            bool anyModifiersPressed = evt.shift || evt.control;

            if (!anyModifiersPressed)
            {
                EditorGUIUtility.PingObject(targetObject);
                return;
            }

            // show large object preview popup; right now only for textures
            if (targetObject is Texture)
            {
                PopupWindowWithoutFocus.Show(
                    new RectOffset(6, 3, 0, 3).Add(position),
                    new ObjectPreviewPopup(targetObject),
                    new[] { PopupLocation.Left, PopupLocation.Below, PopupLocation.Right });
            }
        }
All Usage Examples Of UnityEditor.PopupWindowWithoutFocus::Show