Beispiel #1
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();
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public void OnTouch(LTouch e)
 {
     this.OnTouch(e.X(), e.Y());
 }