public void MouseClicked(LTouch e) { if (isInstance) { currentControl.MouseClicked(e); } }
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; }
/*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"); }
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); }
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 override void TouchMove(Loon.Core.Input.LTouch e) { }
public override void TouchUp(LTouch touch) { }
public override void TouchDrag(LTouch e) { }
public virtual bool IsClickLimit(LTouch e) { return IsClickLimit(e.X(), e.Y()); }
public abstract void TouchDrag(LTouch e);
public override void TouchDrag(LTouch touch) { }
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 override void TouchUp(LTouch e) { }
public override void TouchDown(LTouch e) { }
public abstract void Released(LTouch e);
public abstract void Pressed(LTouch e);
public override void TouchDrag(LTouch arg0) { }
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); }
public virtual void MouseClicked(LTouch e) { }
public void MouseDragged(LTouch e) { if (isInstance) { currentControl.MouseDragged(e); } }
public override void TouchDown(LTouch touch) { }
public void MouseReleased(LTouch e) { if (isInstance) { currentControl.MouseReleased(e); } }
public override void TouchMove(LTouch e) { }
public abstract void TouchDown(LTouch 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 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; }
public override void TouchDrag(Loon.Core.Input.LTouch e) { }
public void OnTouch(LTouch e) { this.OnTouch(e.X(), e.Y()); }
public abstract void TouchUp(LTouch e);
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 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 abstract void TouchMove(LTouch e);
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); }