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(); }
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); }
public void OnTouch(LTouch e) { this.OnTouch(e.X(), e.Y()); }