public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;
            base.MouseDown(mouseDownPos, button);

            bool haveSelected = false;
            for (int i = 0; i < mesh.Vertices.Count; i++)
            {
                if (mesh.Vertices[i].Traits.SelectedFlag == (byte)1) haveSelected = true;
            }


            if (button == EnumMouseButton.Left && !haveSelected)
            {
                selectedPoint = SelectByPoint();
            }


            if (StartMoving() == false) return;
            Vector2D p = mouseDownPos - new Vector2D(projectedCenter.x, projectedCenter.y);
            p.x += 100;
            p.y += 100;

            switch (button)
            {
                case EnumMouseButton.Middle: movingBall.Click(p, ArcBall.MotionType.Rotation); break;
                case EnumMouseButton.Left: movingBall.Click(p / this.ScaleRatio, ArcBall.MotionType.Pan); break;
                case EnumMouseButton.Right: movingBall.Click(p, ArcBall.MotionType.Scale); break;
            }

            TriMeshUtil.GroupVertice(mesh);
            OnChanged(EventArgs.Empty);

        }
Exemple #2
0
        public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }
            base.MouseDown(mouseDownPos, button);

            if (StartMoving() == false)
            {
                return;
            }
            Vector2D p = mouseDownPos - new Vector2D(projectedCenter.x, projectedCenter.y);

            p.x += 100;
            p.y += 100;

            switch (button)
            {
            case EnumMouseButton.Middle: movingBall.Click(p, ArcBall.MotionType.Rotation); break;

            case EnumMouseButton.Left: movingBall.Click(p / this.ScaleRatio, ArcBall.MotionType.Pan); break;

            case EnumMouseButton.Right: movingBall.Click(p, ArcBall.MotionType.Scale); break;
            }

            TriMeshUtil.GroupVertice(mesh);
            OnChanged(EventArgs.Empty);
        }
Exemple #3
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            //if ((Control.ModifierKeys & Keys.Control) == Keys.Control)
            //{
            //    if (button == EnumMouseButton.Left)
            //    {
            //        if ((Control.ModifierKeys & Keys.Shift) != Keys.Shift)
            //        {
            //            NonManifoldMesh m =mesh;
            //            int n = m.VertexCount;
            //            for (int i = 0; i < n; i++)
            //            {
            //                m.VertexFlag[i] = (byte)0;
            //            }
            //        }
            //        SelectRandomPoint();
            //    }
            //}

            //if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt)
            //{ 
            //        NonManifoldMesh m = mesh;
            //        int n =  m.VertexCount;
            //        for (int i = 0; i < n; i++)
            //        {
            //            m.VertexFlag[i] = (byte)0;
            //        }
              
            //}
            //base.MouseUp(mouseUpPos,button);

          
       
        }
Exemple #4
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            //if ((Control.ModifierKeys & Keys.Control) == Keys.Control)
            //{
            //    if (button == EnumMouseButton.Left)
            //    {
            //        if ((Control.ModifierKeys & Keys.Shift) != Keys.Shift)
            //        {
            //            NonManifoldMesh m =mesh;
            //            int n = m.VertexCount;
            //            for (int i = 0; i < n; i++)
            //            {
            //                m.VertexFlag[i] = (byte)0;
            //            }
            //        }
            //        SelectRandomPoint();
            //    }
            //}

            //if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt)
            //{
            //        NonManifoldMesh m = mesh;
            //        int n =  m.VertexCount;
            //        for (int i = 0; i < n; i++)
            //        {
            //            m.VertexFlag[i] = (byte)0;
            //        }

            //}
            //base.MouseUp(mouseUpPos,button);
        }
Exemple #5
0
        public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;
            base.MouseDown(mouseDownPos, button);

        }
Exemple #6
0
       public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
       {
           base.MouseMove(mouseMovePos,button);

           switch (ParameterCurve.Instance.currentCurve)
           {
               case EnumCurveComplex.FourPointBezier :
                   curve = ParameterCurve.Instance.CreateFourBezierCurve(mesh);
                   break;
               case EnumCurveComplex.ThreePointBezier:
                   curve = ParameterCurve.Instance.CreateThreeBezierCurve(mesh);
                   break;
               case EnumCurveComplex.NPointBezier:
                   curve = ParameterCurve.Instance.CreateNBezierCurve(mesh);
                   break;
               case EnumCurveComplex.FourPointBSpline:
                   curve = ParameterCurve.Instance.CreateFourPointBSplineCurve(mesh);
                   break;
               case EnumCurveComplex.NPointBSpline:
                   curve = ParameterCurve.Instance.CreateNBsplineCurve(mesh);
                   break;
               case EnumCurveComplex.NURBS:
                   curve = ParameterCurve.Instance.CreateNURBS(mesh);
                   break;
               case EnumCurveComplex.NURBSCicle:
                   curve = ParameterCurve.Instance.CreateNURBSCicle(mesh);
                   break;
               case EnumCurveComplex.NURBSEllipse:
                   curve = ParameterCurve.Instance.CreateNURBSEllipse(mesh);
                   break;
           }
          
       }
Exemple #7
0
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            base.MouseMove(mouseMovePos, button);

            if (handleIndex == null)
            {
                return;
            }
            Vector2D p = mouseCurrPos - new Vector2D(projectedCenter.x, projectedCenter.y);

            p.x += 100;
            p.y += 100;
            switch (button)
            {
            case EnumMouseButton.Middle: movingBall.Drag(p); break;

            case EnumMouseButton.Left: movingBall.Drag(p / this.ScaleRatio); break;

            case EnumMouseButton.Right: movingBall.Drag(p); break;
            }
            Matrix4D tran = TransformController.Instance.TransformInverse * movingBall.CreateMatrix().Transpose() * TransformController.Instance.ModelMatrix;

            for (int i = 0; i < handleIndex.Count; i++)
            {
                int      j = handleIndex[i];
                Vector4D q = new Vector4D((Vector3D)oldHandlePos[i], 1);
                q = tran * (q - handleCenter) + handleCenter;
                mesh.Vertices[j].Traits.Position.x = q.x;
                mesh.Vertices[j].Traits.Position.y = q.y;
                mesh.Vertices[j].Traits.Position.z = q.z;
            }

            TriMeshUtil.SetUpNormalVertex(mesh);
            OnChanged(EventArgs.Empty);
        }
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {


            base.MouseMove(mouseMovePos, button);

            if (handleIndex == null) return;
            Vector2D p = mouseCurrPos - new Vector2D(projectedCenter.x, projectedCenter.y);
            p.x += 100;
            p.y += 100;
            switch (button)
            {
                case EnumMouseButton.Middle: movingBall.Drag(p); break;
                case EnumMouseButton.Left: movingBall.Drag(p / this.ScaleRatio); break;
                case EnumMouseButton.Right: movingBall.Drag(p); break;
            }
            Matrix4D tran = TransformController.Instance.TransformInverse * movingBall.CreateMatrix().Transpose() * TransformController.Instance.ModelMatrix;

            for (int i = 0; i < handleIndex.Count; i++)
            {
                int j = handleIndex[i];
                Vector4D q = new Vector4D((Vector3D)oldHandlePos[i], 1);
                q = tran * (q - handleCenter) + handleCenter;
                mesh.Vertices[j].Traits.Position.x = q.x;
                mesh.Vertices[j].Traits.Position.y = q.y;
                mesh.Vertices[j].Traits.Position.z = q.z;
            }

            //TriMeshUtil.SetUpNormalVertex(mesh);
            OnChanged(EventArgs.Empty);
        }
 public ItemStackMoveOperation(IWorldAccessor world, EnumMouseButton mouseButton, EnumModifierKey modifiers, EnumMergePriority currentPriority, int requestedQuantity = 0)
 {
     World             = world;
     MouseButton       = mouseButton;
     Modifiers         = modifiers;
     CurrentPriority   = currentPriority;
     RequestedQuantity = requestedQuantity;
 }
Exemple #10
0
 public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
 {
     base.MouseUp(mouseUpPos, button);
     Matrix4D m = this.Ball.CreateMatrix();
     TransformController.Instance.ModelMatrix = m * TransformController.Instance.ModelMatrix;
     this.Ball.End();
     OnChanged(EventArgs.Empty);
 }
Exemple #11
0
 public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
 {
     if (mesh == null)
     {
         return;
     }
     base.MouseDown(mouseDownPos, button);
 }
Exemple #12
0
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            if (mesh == null)
                return;
            base.MouseMove(mouseMovePos, button);

            OnChanged(EventArgs.Empty);
        }
Exemple #13
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            base.MouseUp(mouseUpPos, button);
            Matrix4D m = this.Ball.CreateMatrix();

            TransformController.Instance.ModelMatrix = m * TransformController.Instance.ModelMatrix;
            this.Ball.End();
            OnChanged(EventArgs.Empty);
        }
Exemple #14
0
        public virtual void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            if (this.isMouseDown == false)
            {
                return;
            }

            this.mouseCurrPos = mouseMovePos;
        }
Exemple #15
0
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }
            base.MouseMove(mouseMovePos, button);

            OnChanged(EventArgs.Empty);
        }
Exemple #16
0
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            if (mesh == null)
                return;

            base.MouseMove(mouseMovePos,button); 
            SelectByCircle();
            TriMeshUtil.GroupVertice(mesh);
            OnChanged(EventArgs.Empty);
        }
Exemple #17
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;

            base.MouseUp(mouseUpPos, button); 
           
 
            mesh.GroupingFlags();
            OnChanged(EventArgs.Empty);
        }
Exemple #18
0
        public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            base.MouseDown(mouseDownPos, button);

            switch (button)
            {
                case EnumMouseButton.Left: this.Ball.Click( mouseDownPos, ArcBall.MotionType.Rotation); break;
                case EnumMouseButton.Middle: this.Ball.Click(mouseDownPos / this.ScaleRatio, ArcBall.MotionType.Pan); break;
                case EnumMouseButton.Right: this.Ball.Click(mouseDownPos, ArcBall.MotionType.Scale); break;
            }
        }
Exemple #19
0
        public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;

            base.MouseDown(mouseDownPos, button);

            List<int> line = new List<int>();
            lines.Add(line);

        }
Exemple #20
0
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }

            base.MouseMove(mouseMovePos, button);
            SelectByCircle();
            TriMeshUtil.GroupVertice(mesh);
            OnChanged(EventArgs.Empty);
        }
Exemple #21
0
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            base.MouseMove(mouseMovePos, button);
            switch (button)
            {
                case EnumMouseButton.Left: this.Ball.Drag(mouseCurrPos); break;
                case EnumMouseButton.Middle: this.Ball.Drag(mouseCurrPos / this.ScaleRatio); break;
                case EnumMouseButton.Right: this.Ball.Drag(mouseCurrPos); break;
            }

            OnChanged(EventArgs.Empty);
        }
Exemple #22
0
        public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            base.MouseDown(mouseDownPos, button);

            switch (button)
            {
            case EnumMouseButton.Left: this.Ball.Click(mouseDownPos, ArcBall.MotionType.Rotation); break;

            case EnumMouseButton.Middle: this.Ball.Click(mouseDownPos / this.ScaleRatio, ArcBall.MotionType.Pan); break;

            case EnumMouseButton.Right: this.Ball.Click(mouseDownPos, ArcBall.MotionType.Scale); break;
            }
        }
Exemple #23
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }

            base.MouseUp(mouseUpPos, button);


            mesh.GroupingFlags();
            OnChanged(EventArgs.Empty);
        }
Exemple #24
0
        public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }

            base.MouseDown(mouseDownPos, button);

            List <int> line = new List <int>();

            lines.Add(line);
        }
Exemple #25
0
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            base.MouseMove(mouseMovePos, button);
            switch (button)
            {
            case EnumMouseButton.Left: this.Ball.Drag(mouseCurrPos); break;

            case EnumMouseButton.Middle: this.Ball.Drag(mouseCurrPos / this.ScaleRatio); break;

            case EnumMouseButton.Right: this.Ball.Drag(mouseCurrPos); break;
            }

            OnChanged(EventArgs.Empty);
        }
Exemple #26
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;

            base.MouseUp(mouseUpPos, button);
            if (button == EnumMouseButton.Left)
            {
                selectedPoint = SelectByPoint();
            }
          
            mesh.GroupingFlags();
            OnChanged(EventArgs.Empty);
        }
Exemple #27
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;

            base.MouseUp(mouseUpPos, button);
            if (button == EnumMouseButton.Left)
            {
                selectedEdge = SelectByPoint();
            }

            TriMeshUtil.GroupVertice(mesh);
            OnChanged(EventArgs.Empty);
        }
Exemple #28
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }

            base.MouseUp(mouseUpPos, button);
            if (button == EnumMouseButton.Left)
            {
                selectedEdge = SelectByPoint();
            }

            TriMeshUtil.GroupVertice(mesh);
            OnChanged(EventArgs.Empty);
        }
Exemple #29
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            base.OnMouseUp(e);
            Vector2D        mouseUpPos = new Vector2D(e.X, this.Height - e.Y);
            EnumMouseButton button     = EnumMouseButton.Left;

            switch (e.Button)
            {
            case MouseButtons.Middle: button = EnumMouseButton.Middle; break;

            case MouseButtons.Left: button = EnumMouseButton.Left; break;

            case MouseButtons.Right: button = EnumMouseButton.Right; break;
            }
            ToolPool.Instance.Tool.MouseUp(mouseUpPos, button);
        }
Exemple #30
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }

            base.MouseUp(mouseUpPos, button);
            if (button == EnumMouseButton.Left)
            {
                selectedPoint = SelectByPoint();
            }

            mesh.GroupingFlags();
            OnChanged(EventArgs.Empty);
        }
        public virtual void SlotClick(ICoreClientAPI api, int slotId, EnumMouseButton mouseButton, bool shiftPressed, bool ctrlPressed, bool altPressed)
        {
            //Console.WriteLine("client side slot click on " + slotId);

            List <IInventory> inventories    = api.World.Player.InventoryManager.OpenedInventories;
            IInventory        mouseCursorInv = api.World.Player.InventoryManager.GetOwnInventory(GlobalConstants.mousecursorInvClassName);
            object            packet;

            EnumModifierKey modifiers =
                (shiftPressed ? EnumModifierKey.SHIFT : 0) |
                (ctrlPressed ? EnumModifierKey.CTRL : 0) |
                (altPressed ? EnumModifierKey.ALT : 0)
            ;

            ItemStackMoveOperation op = new ItemStackMoveOperation(api.World, mouseButton, modifiers, EnumMergePriority.AutoMerge);

            op.ActingPlayer = api.World.Player;

            if (shiftPressed)
            {
                ItemSlot sourceSlot = inventory[slotId];
                op.RequestedQuantity = sourceSlot.StackSize;
                packet = inventory.ActivateSlot(slotId, sourceSlot, ref op);
            }
            else
            {
                op.CurrentPriority = EnumMergePriority.DirectMerge;
                packet             = inventory.ActivateSlot(slotId, mouseCursorInv[0], ref op);
            }

            if (packet != null)
            {
                if (packet is object[] packets)
                {
                    for (int i = 0; i < packets.Length; i++)
                    {
                        SendPacketHandler(packets[i]);
                    }
                }
                else
                {
                    SendPacketHandler?.Invoke(packet);
                }
            }

            api.Input.TriggerOnMouseClickSlot(inventory[slotId]);
        }
Exemple #32
0
        public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }
            base.MouseDown(mouseDownPos, button);

            bool haveSelected = false;

            for (int i = 0; i < mesh.Vertices.Count; i++)
            {
                if (mesh.Vertices[i].Traits.SelectedFlag == (byte)1)
                {
                    haveSelected = true;
                }
            }


            if (button == EnumMouseButton.Left && !haveSelected)
            {
                selectedPoint = SelectByPoint();
            }


            if (StartMoving() == false)
            {
                return;
            }
            Vector2D p = mouseDownPos - new Vector2D(projectedCenter.x, projectedCenter.y);

            p.x += 100;
            p.y += 100;

            switch (button)
            {
            case EnumMouseButton.Middle: movingBall.Click(p, ArcBall.MotionType.Rotation); break;

            case EnumMouseButton.Left: movingBall.Click(p / this.ScaleRatio, ArcBall.MotionType.Pan); break;

            case EnumMouseButton.Right: movingBall.Click(p, ArcBall.MotionType.Scale); break;
            }

            TriMeshUtil.GroupVertice(mesh);
            OnChanged(EventArgs.Empty);
        }
Exemple #33
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }

            base.MouseUp(mouseUpPos, button);

            if (handleIndex == null)
            {
                return;
            }
            movingBall.End();

            OnChanged(EventArgs.Empty);
        }
        static void Prefix(ref WorldInteraction wi, out EnumMouseButton __state)
        {
            // Save initial state (because the draw call can happen with the same WorldInterraction multiple times)
            __state = wi.MouseButton;

            // Switch mouse buttons
            switch (wi.MouseButton)
            {
            case EnumMouseButton.Left:
                wi.MouseButton = EnumMouseButton.Right;
                break;

            case EnumMouseButton.Right:
                wi.MouseButton = EnumMouseButton.Left;
                break;
            }
        }
Exemple #35
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;

            base.MouseUp(mouseUpPos, button);

            switch (ToolSetting.ToolsSetting.SelectionMethod)
            {
                case ToolsSettingRecord.EnumSelectingMethod.Rectangle:
                     SelectVertexByRect();
                    break;
                case ToolsSettingRecord.EnumSelectingMethod.Point:
                     SelectVertexByPoint();
                    break;
            }
 
            mesh.GroupingFlags();
            OnChanged(EventArgs.Empty);
        }
Exemple #36
0
        public override void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;
            base.MouseDown(mouseDownPos, button);

            if (StartMoving() == false) return;
            Vector2D p = mouseDownPos - new Vector2D(projectedCenter.x, projectedCenter.y);
            p.x += 100;
            p.y += 100;

            switch (button)
            {
                case EnumMouseButton.Middle: movingBall.Click(p, ArcBall.MotionType.Rotation); break;
                case EnumMouseButton.Left: movingBall.Click(p / this.ScaleRatio, ArcBall.MotionType.Pan); break;
                case EnumMouseButton.Right: movingBall.Click(p, ArcBall.MotionType.Scale); break;
            } 

            TriMeshUtil.GroupVertice(mesh);
            OnChanged(EventArgs.Empty);

        }
Exemple #37
0
        public override void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            base.MouseMove(mouseMovePos, button);

            switch (ParameterCurve.Instance.currentCurve)
            {
            case EnumCurveComplex.FourPointBezier:
                curve = ParameterCurve.Instance.CreateFourBezierCurve(mesh);
                break;

            case EnumCurveComplex.ThreePointBezier:
                curve = ParameterCurve.Instance.CreateThreeBezierCurve(mesh);
                break;

            case EnumCurveComplex.NPointBezier:
                curve = ParameterCurve.Instance.CreateNBezierCurve(mesh);
                break;

            case EnumCurveComplex.FourPointBSpline:
                curve = ParameterCurve.Instance.CreateFourPointBSplineCurve(mesh);
                break;

            case EnumCurveComplex.NPointBSpline:
                curve = ParameterCurve.Instance.CreateNBsplineCurve(mesh);
                break;

            case EnumCurveComplex.NURBS:
                curve = ParameterCurve.Instance.CreateNURBS(mesh);
                break;

            case EnumCurveComplex.NURBSCicle:
                curve = ParameterCurve.Instance.CreateNURBSCicle(mesh);
                break;

            case EnumCurveComplex.NURBSEllipse:
                curve = ParameterCurve.Instance.CreateNURBSEllipse(mesh);
                break;
            }
        }
Exemple #38
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }

            base.MouseUp(mouseUpPos, button);

            for (int i = 0; i < mesh.Vertices.Count; i++)
            {
                mesh.Vertices[i].Traits.SelectedFlag = (byte)0;
            }

            if (handleIndex == null)
            {
                return;
            }
            movingBall.End();

            OnChanged(EventArgs.Empty);
        }
Exemple #39
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
            {
                return;
            }

            base.MouseUp(mouseUpPos, button);

            switch (ToolSetting.ToolsSetting.SelectionMethod)
            {
            case ToolsSettingRecord.EnumSelectingMethod.Rectangle:
                SelectVertexByRect();
                break;

            case ToolsSettingRecord.EnumSelectingMethod.Point:
                SelectVertexByPoint();
                break;
            }

            mesh.GroupingFlags();
            OnChanged(EventArgs.Empty);
        }
Exemple #40
0
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;

            base.MouseUp(mouseUpPos, button);

            if (handleIndex == null) return;
            movingBall.End();

            OnChanged(EventArgs.Empty);
        }
Exemple #41
0
 public virtual void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
 {
     this.isMouseDown = false;
     this.mouseCurrPos = mouseUpPos;
 }
Exemple #42
0
        public virtual void MouseDown(Vector2D mouseDownPos,EnumMouseButton button)
        {
            this.mouseDownPos = mouseDownPos;
            this.isMouseDown = true;

        }
 static void Postfix(ref WorldInteraction wi, EnumMouseButton __state)
 {
     // Restore original state
     wi.MouseButton = __state;
 }
 public ItemStackMergeOperation(IWorldAccessor world, EnumMouseButton mouseButton, EnumModifierKey modifiers, EnumMergePriority currentPriority, int requestedQuantity) : base(world, mouseButton, modifiers, currentPriority, requestedQuantity)
 {
 }
Exemple #45
0
        /// <summary>
        /// This is apparently used for mouse move events (set to true if the mouse state has changed during constant polling, set to false if the move event came from opentk. This emulated state is apparantly used to determine the correct delta position to turn the camera.
        /// </summary>
        /// <returns></returns>
        ///
        //public bool Emulated;


        public MouseEvent(int x, int y, int deltaX, int deltaY, EnumMouseButton button)
        {
            X = x; Y = y; DeltaX = deltaX; DeltaY = deltaY; Button = button;
        }
Exemple #46
0
 public MouseEvent(int x, int y, EnumMouseButton button)
     : this(x, y, 0, 0, button)
 {
 }
Exemple #47
0
 public virtual void MouseDown(Vector2D mouseDownPos, EnumMouseButton button)
 {
     this.mouseDownPos = mouseDownPos;
     this.isMouseDown  = true;
 }
Exemple #48
0
        public virtual void MouseMove(Vector2D mouseMovePos, EnumMouseButton button)
        {
            if (this.isMouseDown == false) return;

            this.mouseCurrPos = mouseMovePos;

        }
Exemple #49
0
 public virtual void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
 {
     this.isMouseDown  = false;
     this.mouseCurrPos = mouseUpPos;
 }
        public override void MouseUp(Vector2D mouseUpPos, EnumMouseButton button)
        {
            if (mesh == null)
                return;

            base.MouseUp(mouseUpPos, button);

            for (int i = 0; i < mesh.Vertices.Count; i++)
            {
                mesh.Vertices[i].Traits.SelectedFlag = (byte)0;
            }

            if (handleIndex == null) return;
            movingBall.End();

            OnChanged(EventArgs.Empty);
        }