/// <summary> /// Tritt ein, wenn sich die Größe des Formulares ändert. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GameForm_SizeChanged(object sender, EventArgs e) { MouseInput.SetParrentSize(this.Size.ToPoint()); }
/// <summary> /// Tritt ein, wenn die Position des Formulars geändert wird. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GameForm_LocationChanged(object sender, EventArgs e) { MouseInput.SetScreenPos(this.Location); }
/// <summary> /// Tritt ein, wenn die Maus über dem Screen bewegt wird. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void OnMouseMove(object sender, MouseEventArgs args) { MouseInput.SetPosition(new Point(args.X, args.Y), (Bitmap)drawArea); }
private void GameForm_Load(object sender, EventArgs e) { game = new GameV3(this); game.Initialize(); MouseInput.SetParrentSize(this.Size.ToPoint()); }
/// <summary> /// Tritt ein, wenn das Mausrad bewegt wurde. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void OnMouseWheel(object sender, MouseEventArgs args) { MouseInput.SetScrollValue(args.Delta); }