Esempio n. 1
0
        /// <summary>
        /// 只有在范围内鼠标左键抬起时才
        /// 调用event_OnlyInsideMouseUp()。
        /// </summary>
        public void OnlyInsideMouseLeftUp()
        {
            if (InputStatus.GetButton(InputProperty.LeftButton) == true &&
                Father.Contain(Gui.Position) == false)
            {
                OIMLU_IsDown = true;
                //说明是在外面按下的鼠标
            }

            if (InputStatus.GetButton(InputProperty.LeftButton) == false &&
                OIMLU_Status == true &&
                Father.Contain(Gui.Position) &&
                OIMLU_IsDown == true)

            {
                event_OnlyInsideMouseLeftUp();
            }


            if (InputStatus.GetButton(InputProperty.LeftButton) == false)
            {
                OIMLU_IsDown = false;
            }

            OIMLU_Status = InputStatus.GetButton(InputProperty.LeftButton);//鼠标持续状态
        }
Esempio n. 2
0
 public void InsideMouseLeftDown()
 {
     if (InputStatus.GetButton(InputProperty.LeftButton) == true &&
         Father.Contain(Gui.Position) == true)
     {
         event_InsideMouseLeftDown();
     }
 }
Esempio n. 3
0
        public void InsideMouseRightUp()
        {
            if (InputStatus.GetButton(InputProperty.RightButton) == false &&
                IMRU_lastMouseStatus == true &&
                Father.Contain(Gui.Position))

            {
                event_InsideMouseRightUp();
            }

            IMRU_lastMouseStatus = InputStatus.GetButton(InputProperty.RightButton);
        }
Esempio n. 4
0
 public void MouseHoverFromInsideOut()
 {
     if (!Father.Contain(Gui.Position) &&
         MHFIO_Inside)
     {
         event_MouseHoverFromInsideOut();
         MHFIO_Inside = false;
     }
     if (Father.Contain(Gui.Position))
     {
         MHFIO_Inside = true;
     }
 }
Esempio n. 5
0
        public void InsideMouseLeftOnceDown()
        {
            if (InputStatus.GetButton(InputProperty.LeftButton) == true &&
                Father.Contain(Gui.Position) == true)
            {
                IMLOD_already = false;
            }

            if (InputStatus.GetButton(InputProperty.LeftButton) == true &&
                Father.Contain(Gui.Position) == true &&
                IMLOD_already)
            {
                event_InsideMouseLeftOnceDown();
                IMLOD_already = false;
            }

            if (InputStatus.GetButton(InputProperty.LeftButton) == false &&
                Father.Contain(Gui.Position))
            {
                IMLOD_already = true;
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 当鼠标以左键按下状态从内部移出范围时
        /// </summary>
        public void MouseDownDragOutside()
        {
            if (InputStatus.GetButton(InputProperty.LeftButton) == true &&
                Father.Contain(Gui.Position) == true)
            //鼠标以按下的状态,存在于范围内
            {
                MDDO_IsDown = true;
            }

            if (InputStatus.GetButton(InputProperty.LeftButton) == true &&
                Father.Contain(Gui.Position) == false &&
                MDDO_IsDown == true &&
                MDDO_Status == true)
            //鼠标曾以按下的状态,存在于范围内
            //此时不在范围内,并且鼠标现在还是按下状态
            {
                event_MouseDownDragOutside();
                MDDO_already = true;
            }

            if (MDDO_already &&
                InputStatus.GetButton(InputProperty.LeftButton) == false &&
                Father.Contain(Gui.Position) == false)
            {
                event_MouseDownDragOutside_MouseUp();
                MDDO_already = false;
            }

            if (InputStatus.GetButton(InputProperty.LeftButton) == false)
            {
                MDDO_IsDown = false;
            }


            MDDO_Status = InputStatus.GetButton(InputProperty.LeftButton);
        }
Esempio n. 7
0
        /// <summary>
        /// 当鼠标左键以按下状态从外部进入范围内
        /// </summary>
        public void MouseDownDragInside()
        {
            if (InputStatus.GetButton(InputProperty.LeftButton) == true &&
                Father.Contain(Gui.Position) == false)
            {
                MDDI_IsDown = true;
                //说明是在外面按下的鼠标
            }

            if (InputStatus.GetButton(InputProperty.LeftButton) == true &&
                Father.Contain(Gui.Position) == true &&
                MDDI_IsDown == true &&
                MDDI_Status == true)
            {
                event_MouseDownDragInside();
            }

            if (InputStatus.GetButton(InputProperty.LeftButton) == false)
            {
                MDDI_IsDown = false;
            }

            MDDI_Status = InputStatus.GetButton(InputProperty.LeftButton);
        }