Mouse GetButtonState Method Delta Engine Documentation

Namespace: DeltaEngine.Input
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public State GetButtonState(
	MouseButton button
)

Return Value

Type: State
Remarks

Tests: DeltaEngine.Input.Tests.MouseTests
Examples

1 unit tests call DeltaEngine.Input.Mouse.GetButtonState(DeltaEngine.Input.MouseButton)
[Test, CloseAfterFirstFrame]
public void GetButtonState()
{
    var mouse = Resolve<Mouse>();
    Assert.AreEqual(State.Released, mouse.GetButtonState(MouseButton.Left));
    Assert.AreEqual(State.Released, mouse.GetButtonState(MouseButton.Middle));
    Assert.AreEqual(State.Released, mouse.GetButtonState(MouseButton.Right));
    Assert.AreEqual(State.Released, mouse.GetButtonState(MouseButton.X1));
    Assert.AreEqual(State.Released, mouse.GetButtonState(MouseButton.X2));
}
See Also