예제 #1
0
        /// <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);
        }
예제 #2
0
 public virtual bool MouseReleased(SIS.MouseEventArgs evt, SIS.MouseButtonID id)
 {
     if (CurrentSample != null && !this.IsSamplePaused)
     {
         return(CurrentSample.MouseReleased(evt, id));
     }
     return(true);
 }
예제 #3
0
        /*-----------------------------------------------------------------------------
        | 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;
                }
            }
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        /// <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);
        }
예제 #7
0
파일: Sample.cs 프로젝트: bostich83/axiom
 public virtual bool MouseReleased(SIS.MouseEventArgs evt, SIS.MouseButtonID id)
 {
     return(true);
 }