Esempio n. 1
0
 public virtual void MouseReleased(LTouch e)
 {
     if (isLock || isClose || !isLoad)
     {
         return;
     }
     int type = e.GetCode();
     int button = e.GetButton();
     try
     {
         if (useScreenListener)
         {
             foreach (ScreenListener t in screens)
             {
                 t.Released(e);
             }
         }
         this.touchX = e.X();
         this.touchY = e.Y();
         if (!IsClickLimit(e))
         {
             TouchUp(e);
         }
         touchType[type] = false;
         touchButtonReleased = button;
         touchButtonPressed = NO_BUTTON;
         if (isMultitouch && desktop != null)
         {
             desktop.DoClicked(touchX, touchY);
         }
     }
     catch (Exception ex)
     {
         touchButtonPressed = NO_BUTTON;
         touchButtonReleased = NO_BUTTON;
         Log.Exception(ex);
     }
 }
Esempio n. 2
0
 public void MousePressed(LTouch e)
 {
     if (isLock || isClose || !isLoad)
     {
         return;
     }
     int type = e.GetCode();
     int button = e.GetButton();
     try
     {
         this.touchX = e.X();
         this.touchY = e.Y();
         touchType[type] = true;
         touchButtonPressed = button;
         touchButtonReleased = NO_BUTTON;
         if (useTouchListener)
         {
             foreach (TouchListener t in touchs)
             {
                 t.pressed(e);
             }
         }
         if (!IsClickLimit(e))
         {
             TouchDown(e);
         }
         if (isMultitouch && desktop != null)
         {
             desktop.DoClick(touchX, touchY);
         }
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
         touchButtonPressed = NO_BUTTON;
         touchButtonReleased = NO_BUTTON;
     }
 }