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