Exemple #1
0
 public void MouseClicked(LTouch e)
 {
     if (isInstance)
     {
         currentControl.MouseClicked(e);
     }
 }
Exemple #2
0
 protected LTouch(LTouch touch)
 {
     this.type    = touch.type;
     this.x0      = touch.x0;
     this.y0      = touch.y0;
     this.button  = touch.button;
     this.pointer = touch.pointer;
     this.id      = touch.id;
 }
Exemple #3
0
 protected LTouch(LTouch touch)
 {
     this.type = touch.type;
     this.x0 = touch.x0;
     this.y0 = touch.y0;
     this.button = touch.button;
     this.pointer = touch.pointer;
     this.id = touch.id;
 }
Exemple #4
0
        /*public class play : Updateable
         * {
         *  public void Action()
         *  {
         *      SoundEffect explosion = LSystem.screenActivity.GameRes.Load<SoundEffect>("Content/decide1");
         *      explosion.Play();
         *  }
         * }*/

        public override void TouchDown(Loon.Core.Input.LTouch e)
        {
            //   PlaySound("decide1.wav");
            //LSystem.Unload(new play());
            ///  SoundPlayer audio = new SoundPlayer("decide1");
            // audio.Start();

            // PlaySound("000");
        }
Exemple #5
0
 public bool Equals(LTouch e)
 {
     if (e == null)
     {
         return(false);
     }
     if (e == this)
     {
         return(true);
     }
     if (e.type == type && e.x0 == x0 && e.y0 == y0 && e.button == button &&
         e.pointer == pointer && e.id == id)
     {
         return(true);
     }
     return(false);
 }
Exemple #6
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;
     }
 }
Exemple #7
0
 public override void TouchMove(Loon.Core.Input.LTouch e)
 {
 }
 public override void TouchUp(LTouch touch)
 {
 }
 public override void TouchDrag(LTouch e)
 {
 }
Exemple #10
0
 public virtual bool IsClickLimit(LTouch e)
 {
     return IsClickLimit(e.X(), e.Y());
 }
Exemple #11
0
 public abstract void TouchDrag(LTouch e);
Exemple #12
0
 public override void TouchDrag(LTouch touch)
 {
 }
Exemple #13
0
 public override void TouchDown(LTouch touch)
 {
     if (desktop != null)
     {
         LComponent[] cs = desktop.GetContentPane().GetComponents();
         for (int i = 0; i < cs.Length; i++)
         {
             if (cs[i] is LButton)
             {
                 LButton btn = ((LButton)cs[i]);
                 if (btn != null && btn.IsVisible())
                 {
                     if (btn.Intersects(touch.X(), touch.Y()))
                     {
                         btn.DoClick();
                     }
                 }
             }
             else if (cs[i] is LPaper)
             {
                 LPaper paper = ((LPaper)cs[i]);
                 if (paper != null && paper.IsVisible())
                 {
                     if (paper.Intersects(touch.X(), touch.Y()))
                     {
                         paper.DoClick();
                     }
                 }
             }
         }
     }
     Click();
 }
Exemple #14
0
 public override void TouchUp(LTouch e)
 {
  
 }
Exemple #15
0
 public override void TouchDown(LTouch e)
 {
  
 }
Exemple #16
0
		public abstract void Released(LTouch e);
Exemple #17
0
		public abstract void Pressed(LTouch e);
Exemple #18
0
        public override void TouchDrag(LTouch arg0)
        {

        }
Exemple #19
0
 public virtual void MouseDragged(LTouch e)
 {
     if (isLock || isClose || !isLoad)
     {
         return;
     }
     if (isTranslate)
     {
         e.Offset(tx, ty);
     }
     if (useScreenListener)
     {
         foreach (ScreenListener t in screens)
         {
             t.Drag(e);
         }
     }
     this.touchX = e.X();
     this.touchY = e.Y();
     if (!IsClickLimit(e))
     {
         TouchDrag(e);
     }
 }
 public void Draw(GLEx g, LTouch e)
 {
     int x = e.X() / tileWidth;
     int y = e.Y() / tileHeight;
     Draw(g, 0, 0, x, y, width - defWidth, height - defHeight, false);
 }
Exemple #21
0
        public virtual void MouseClicked(LTouch e)
        {

        }
Exemple #22
0
 public void MouseDragged(LTouch e)
 {
     if (isInstance)
     {
         currentControl.MouseDragged(e);
     }
 }
 public override void TouchDown(LTouch touch)
 {
 }
Exemple #24
0
 public void MouseReleased(LTouch e)
 {
     if (isInstance)
     {
         currentControl.MouseReleased(e);
     }
 }
 public override void TouchMove(LTouch e)
 {
 }
Exemple #26
0
 public abstract void TouchDown(LTouch e);
Exemple #27
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);
     }
 }
Exemple #28
0
 public bool Equals(LTouch e)
 {
     if (e == null)
     {
         return false;
     }
     if (e == this)
     {
         return true;
     }
     if (e.type == type && e.x0 == x0 && e.y0 == y0 && e.button == button
             && e.pointer == pointer && e.id == id)
     {
         return true;
     }
     return false;
 }
Exemple #29
0
 public override void TouchDrag(Loon.Core.Input.LTouch e)
 {
 }
Exemple #30
0
 public void OnTouch(LTouch e)
 {
     this.OnTouch(e.X(), e.Y());
 }
Exemple #31
0
 public abstract void TouchUp(LTouch e);
Exemple #32
0
 public virtual void MouseMoved(LTouch e)
 {
     if (isLock || isClose || !isLoad)
     {
         return;
     }
     if (isTranslate)
     {
         e.Offset(tx, ty);
     }
     if (useTouchListener)
     {
         foreach (TouchListener t in touchs)
         {
             t.move(e);
         }
     }
     this.touchX = e.X();
     this.touchY = e.Y();
     if (!IsClickLimit(e))
     {
         TouchMove(e);
     }
 }
Exemple #33
0
 public virtual void MouseMoved(LTouch e)
 {
     if (isLock || isClose || !isLoad)
     {
         return;
     }
     if (useScreenListener)
     {
         foreach (ScreenListener t in screens)
         {
             t.Move(e);
         }
     }
     this.touchX = e.X();
     this.touchY = e.Y();
     if (!IsClickLimit(e))
     {
         TouchMove(e);
     }
 }
Exemple #34
0
 public abstract void TouchMove(LTouch e);
Exemple #35
0
 public void OnPosition(LTouch e)
 {
     this.OnPosition(e.GetX(), e.GetY());
 }
 public override void TouchMove(LTouch e)
 {
     foreach (Drawable drawable in drawablesToDraw)
     {
         if (drawable._enabled)
         {
             if (drawable != null)
             {
                 if (drawable.GetDrawableState() == Painting.DrawableState.Hidden)
                 {
                     continue;
                 }
                 drawable.Move(e);
             }
         }
     }
     Move(e);
 }