예제 #1
0
 bool ProcessClick(EventBase evt)
 {
     if (evt.eventTypeId == MouseUpEvent.TypeId())
     {
         var ce = (IMouseEvent)evt;
         if (ce.button == (int)MouseButton.LeftMouse)
         {
             return(true);
         }
     }
     else if (evt.eventTypeId == PointerUpEvent.TypeId() || evt.eventTypeId == ClickEvent.TypeId())
     {
         var ce = (IPointerEvent)evt;
         if (ce.button == (int)MouseButton.LeftMouse)
         {
             return(true);
         }
     }
     return(false);
 }
예제 #2
0
 void OnClickEvent(EventBase evt)
 {
     if (evt.eventTypeId == MouseUpEvent.TypeId())
     {
         var ce = (IMouseEvent)evt;
         if (ce.button == (int)MouseButton.LeftMouse)
         {
             ToggleValue();
         }
     }
     else if (evt.eventTypeId == PointerUpEvent.TypeId() || evt.eventTypeId == ClickEvent.TypeId())
     {
         var ce = (IPointerEvent)evt;
         if (ce.button == (int)MouseButton.LeftMouse)
         {
             ToggleValue();
         }
     }
 }