/// <summary> /// /// </summary> /// <param name="evt"></param> /// <param name="id"></param> /// <returns></returns> public override bool MousePressed(SIS.MouseEventArgs evt, SIS.MouseButtonID id) { if (this.TrayManager.InjectMouseDown(evt, id)) { return(true); } if (this.TitleLabel.TrayLocation != TrayLocation.None) { for (int i = 0; i < this.Thumbs.Count; i++) { if (this.Thumbs[i].IsVisible && Widget.IsCursorOver(this.Thumbs[i], new Vector2(this.TrayManager.CursorContainer.Left, this.TrayManager.CursorContainer.Top), 0)) { this.SampleMenu.SelectItem(i); break; } } } try { return(base.MousePressed(evt, id)); } catch (Exception ex) { RunSample(null); string msg = ex.Message + "\nSource: " + ex.InnerException; LogManager.Instance.Write("[Samples] Error! " + msg); this.TrayManager.ShowOkDialog("Error!", msg); } return(true); }
public virtual bool MouseReleased(SIS.MouseEventArgs evt, SIS.MouseButtonID id) { if (CurrentSample != null && !this.IsSamplePaused) { return(CurrentSample.MouseReleased(evt, id)); } return(true); }
/*----------------------------------------------------------------------------- | Processes mouse releases. Only applies for orbit style. | Left button is for orbiting, and right button is for zooming. | -----------------------------------------------------------------------------*/ public virtual void injectMouseUp(SIS.MouseEventArgs evt, SIS.MouseButtonID id) { if (this.mStyle == CameraStyle.Orbit) { if (id == SIS.MouseButtonID.Left) { this.mOrbiting = false; } else if (id == SIS.MouseButtonID.Right) { this.mZooming = false; } } }
public override bool MouseReleased(SIS.MouseEventArgs evt, SIS.MouseButtonID id) { if (this.TrayManager.InjectMouseUp(evt, id)) { return(true); } if (this.dragLook && id == SIS.MouseButtonID.Left) { this.CameraManager.setStyle(CameraStyle.Manual); this.TrayManager.ShowCursor(); } this.CameraManager.injectMouseUp(evt, id); return(true); }
public override bool MousePressed(SIS.MouseEventArgs evt, SIS.MouseButtonID id) { if (this.TrayManager.InjectMouseDown(evt, id)) { return(true); } if (this.dragLook && id == SIS.MouseButtonID.Left) { this.CameraManager.setStyle(CameraStyle.FreeLook); this.TrayManager.HideCursor(); } this.CameraManager.injectMouseDown(evt, id); return(true); }
/// <summary> /// /// </summary> /// <param name="evt"></param> /// <param name="id"></param> /// <returns></returns> public override bool MouseReleased(SIS.MouseEventArgs evt, SIS.MouseButtonID id) { if (this.TrayManager.InjectMouseUp(evt, id)) { return(true); } try { return(base.MouseReleased(evt, id)); } catch (Exception ex) { RunSample(null); string msg = ex.Message + "\nSource: " + ex.InnerException; LogManager.Instance.Write("[Samples] Error! " + msg); this.TrayManager.ShowOkDialog("Error!", msg); } return(true); }
public virtual bool MouseReleased(SIS.MouseEventArgs evt, SIS.MouseButtonID id) { return(true); }