Exemple #1
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     if (eventData.IsF3dSpacePointer())
     {
         // Gaze has entered this canvas. We'll make it the active one so that canvas-mouse pointer can be used.
         GCSeriesInputModule inputModule = EventSystem.current.currentInputModule as GCSeriesInputModule;
         inputModule.activeGraphicRaycaster = this;
     }
 }
Exemple #2
0
 public void OnPointerExit(PointerEventData eventData)
 {
     if (eventData.IsF3dSpacePointer())
     {
         // Gaze has entered this canvas. We'll make it the active one so that canvas-mouse pointer can be used.
         GCSeriesInputModule inputModule = EventSystem.current.currentInputModule as GCSeriesInputModule;
         //eventData.pointerEnter
         if (eventData.pointerPress)
         {
             //if(null == eventData.pointerEnter)
             //{
             if (eventData.pointerPress != null)
             {
                 Button uiButton = eventData.pointerPress.GetComponent <Button>();
                 if (null != uiButton)
                 {
                     uiButton.OnDeselect(eventData);
                     //uiButton.de
                 }
                 else
                 {
                     Toggle toggle = eventData.pointerPress.GetComponent <Toggle>();
                     if (toggle != null)
                     {
                         toggle.OnDeselect(eventData);
                         toggle.Select();
                     }
                 }
                 //}
                 Debug.Log("F3dSpaceRaycaster.OnPointerExit()");
             }
             //.transform.GetComponentInParent
         }
         //inputModule.activeGraphicRaycaster = null;
     }
 }
Exemple #3
0
        /// <summary>
        /// Is this the currently focussed Raycaster according to the InputModule
        /// </summary>
        /// <returns></returns>
        public bool IsFocussed()
        {
            GCSeriesInputModule inputModule = EventSystem.current.currentInputModule as GCSeriesInputModule;

            return(inputModule && inputModule.activeGraphicRaycaster == this);
        }