Ejemplo n.º 1
0
        private static void TakeCapture()
        {
            if (s_ContainerStack.Count > 0)
            {
                var topmostContainer = s_ContainerStack.Peek();

                if (MouseCaptureController.IsMouseCaptureTaken() && !topmostContainer.HasMouseCapture())
                {
                    Debug.Log("Should not grab hot control with an active capture");
                }
                topmostContainer.TakeMouseCapture();
            }
        }
Ejemplo n.º 2
0
 private static void TakeCapture()
 {
     if (UIElementsUtility.s_ContainerStack.Count > 0)
     {
         IMGUIContainer iMGUIContainer = UIElementsUtility.s_ContainerStack.Peek();
         if (iMGUIContainer.GUIDepth == GUIUtility.Internal_GetGUIDepth())
         {
             if (MouseCaptureController.IsMouseCaptureTaken() && !iMGUIContainer.HasMouseCapture())
             {
                 Debug.Log("Should not grab hot control with an active capture");
             }
             iMGUIContainer.TakeMouseCapture();
         }
     }
 }
        protected bool CanStartManipulation(IMouseEvent e)
        {
            if (MouseCaptureController.IsMouseCaptureTaken())
            {
                return(false);
            }

            foreach (var activator in activators)
            {
                if (activator.Matches(e))
                {
                    m_currentActivator = activator;
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 4
0
        private static void TakeCapture()
        {
            if (s_ContainerStack.Count > 0)
            {
                var topmostContainer = s_ContainerStack.Peek();

                if (topmostContainer.GUIDepth != GUIUtility.Internal_GetGUIDepth())
                {
                    return;
                }

                if (MouseCaptureController.IsMouseCaptureTaken() && !topmostContainer.HasMouseCapture())
                {
                    Debug.Log("Should not grab hot control with an active capture");
                }
                topmostContainer.TakeMouseCapture();
            }
        }
Ejemplo n.º 5
0
        protected bool CanStartManipulation(IMouseEvent e)
        {
            bool result;

            if (MouseCaptureController.IsMouseCaptureTaken())
            {
                result = false;
            }
            else
            {
                foreach (ManipulatorActivationFilter current in this.activators)
                {
                    if (current.Matches(e))
                    {
                        this.m_currentActivator = current;
                        result = true;
                        return(result);
                    }
                }
                result = false;
            }
            return(result);
        }