using System;
namespace StardewModdingAPI.Events
{
/// Event arguments when the player scrolls the mouse wheel.
public class InputMouseWheelScrolledEventArgs : EventArgs
{
/*********
** Accessors
*********/
/// The cursor position.
public ICursorPosition Position { get; }
/// The old scroll value.
public int OldValue { get; }
/// The new scroll value.
public int NewValue { get; }
/// The amount by which the scroll value changed.
public int Delta => this.NewValue - this.OldValue;
/*********
** Public methods
*********/
/// Construct an instance.
/// The cursor position.
/// The old scroll value.
/// The new scroll value.
public InputMouseWheelScrolledEventArgs(ICursorPosition position, int oldValue, int newValue)
{
this.Position = position;
this.OldValue = oldValue;
this.NewValue = newValue;
}
}
}