public override void OnMouseMotion(SdlDotNet.Input.MouseMotionEventArgs e) { base.OnMouseMotion(e); //if (activeModule != null) { // activeModule.ModulePanel.OnMouseMotion(e); //} }
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); } } }
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; } }
/// <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); }
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; //} } } }
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); } } } }
public static void SdlDotNet_Core_Events_MouseMotion(object sender, SdlDotNet.Input.MouseMotionEventArgs e) { SdlDotNet.Widgets.WindowManager.HandleMouseMotion(e); }
public override void OnMouseMotion(SdlDotNet.Input.MouseMotionEventArgs e) { base.OnMouseMotion(e); }
// this procedure is called when the mouse is moved static void onMouseMove(object sender, SdlDotNet.Input.MouseMotionEventArgs args) { }
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); }