Пример #1
0
 public override void OnMouseMotion(SdlDotNet.Input.MouseMotionEventArgs e)
 {
     base.OnMouseMotion(e);
     //if (activeModule != null) {
     //    activeModule.ModulePanel.OnMouseMotion(e);
     //}
 }
Пример #2
0
 public virtual void Mouse_Motion(SdlDotNet.Input.MouseMotionEventArgs e)
 {
     if (SdlDotNet.Input.Mouse.IsButtonPressed(SdlDotNet.Input.MouseButton.PrimaryButton))
     {
         if (this.mDrag)
         {
             this.Location = new Point(e.Position.X - this.mDragStart.X, e.Position.Y - this.mDragStart.Y);
         }
     }
 }
Пример #3
0
        static void onMouseMove(object sender, SdlDotNet.Input.MouseMotionEventArgs args)
        {
            int batw = sprite_sheet_cut[(int)Sprite.bat_small].Width;

            xpos += args.RelativeX;
            if (xpos > 640 - batw)
            {
                xpos = 640 - batw;
            }

            if (xpos < 0)
            {
                xpos = 0;
            }
        }
Пример #4
0
        /// <summary>
        /// Handles the MouseMotion event of the Events control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="SdlDotNet.Input.MouseMotionEventArgs"/> instance containing the event data.</param>
        void Events_MouseMotion(object sender, SdlDotNet.Input.MouseMotionEventArgs e)
        {
            int realX = e.X / Game.Scale - 2;
            int realY = e.Y / Game.Scale - 2;

            MouseMoveEventArgument eventArgument = new MouseMoveEventArgument();

            eventArgument.X           = realX;
            eventArgument.Y           = realY;
            eventArgument.Bubble      = true;
            eventArgument.MouseButton = e.Button;

            // Find a suitable control to accept the event
            Game.GuiManager.GetFace(Game.GameScreenManager.CurrentGameScreen.FaceId).Bubble(BubbleFace, eventArgument);
        }
Пример #5
0
 public static void Mouse_Motion(SdlDotNet.Input.MouseMotionEventArgs e)
 {
     if (mOpenWindows.Count > 0)
     {
         //GetTopMostWindow().Mouse_Motion(e);
         for (int i = mOpenWindows.Count - 1; i >= 0; i--)
         {
             //if (PointInBounds(e.Position, mOpenWindows[i].FullBounds)) {
             mOpenWindows[i].Mouse_Motion(e);
             //if (mOpenWindows[mOpenWindows.Count - 1].AlwaysOnTop == false && i != mOpenWindows.Count - 1) {
             //    SwitchWindows(i, mOpenWindows.Count - 1);
             //}
             //break;
             //}
         }
     }
 }
Пример #6
0
 public override void OnMouseMotion(SdlDotNet.Input.MouseMotionEventArgs e)
 {
     base.OnMouseMotion(e);
     //rwLock.EnterUpgradeableReadLock();
     try {
         foreach (IMenu menu in openMenus)
         {
             if (DrawingSupport.PointInBounds(e.Position, menu.MenuPanel.Bounds))
             {
                 menu.MenuPanel.OnMouseMotion(e);
                 break;
             }
         }
     } finally {
         //rwLock.ExitUpgradeableReadLock();
     }
 }
 private void Events_MouseMotion(object sender, SdlDotNet.Input.MouseMotionEventArgs e)
 {
     if (GameState == (int)State.homeScreen)
     {
         temp = new Rectangle(e.Position, new Size(1, 1));       // maak van je muispositie een kleine rechthoek
         for (int i = 0; i < rectMenuItemsList.Count; i++)
         {
             if (temp.IntersectsWith(rectMenuItemsList[i]))      // muis komt op de menu tekst
             {
                 m_menuItemsList[i].ReplaceColor(Color.White, Color.Yellow);
             }
             else
             {
                 m_menuItemsList[i].ReplaceColor(Color.Yellow, Color.White);
             }
         }
     }
 }
Пример #8
0
 public static void SdlDotNet_Core_Events_MouseMotion(object sender, SdlDotNet.Input.MouseMotionEventArgs e)
 {
     SdlDotNet.Widgets.WindowManager.HandleMouseMotion(e);
 }
Пример #9
0
 public override void OnMouseMotion(SdlDotNet.Input.MouseMotionEventArgs e)
 {
     base.OnMouseMotion(e);
 }
Пример #10
0
 // this procedure is called when the mouse is moved
 static void onMouseMove(object sender, SdlDotNet.Input.MouseMotionEventArgs args)
 {
 }
Пример #11
0
 void Events_MouseMotion(object sender, SdlDotNet.Input.MouseMotionEventArgs e)
 {
 }
 // this procedure is called when the mouse is moved
 static void onMouseMove(object sender, SdlDotNet.Input.MouseMotionEventArgs args)
 {
     duck.setX(SdlDotNet.Input.Mouse.MousePosition.X);
 }