Skip to content

Commit 19cc61d

Browse files
authored
fix: Add mouse wheel delta to virtual button (#2946)
1 parent 14781ee commit 19cc61d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sources/engine/Stride.Input/VirtualButton/VirtualButton.Mouse.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ protected Mouse(string name, int id, bool isPositiveAndNegative)
6262
/// </summary>
6363
public static readonly Mouse DeltaY = new Mouse("DeltaY", 8, true);
6464

65+
/// <summary>
66+
/// Equivalent to <see cref="InputManager.MouseWheelDelta"/>.
67+
/// </summary>
68+
public static readonly Mouse WheelDelta = new Mouse("WheelDelta", 9, true);
69+
6570
public override float GetValue(InputManager manager)
6671
{
6772
if (Index < 5)
@@ -81,6 +86,8 @@ public override float GetValue(InputManager manager)
8186
return manager.MouseDelta.X;
8287
case 8:
8388
return manager.MouseDelta.Y;
89+
case 9:
90+
return manager.MouseWheelDelta;
8491
}
8592
}
8693

0 commit comments

Comments
 (0)