ButtonTests HiddenControlDoesNotRespondToClick Method Delta Engine Documentation

Namespace: DeltaEngine.Scenes.Tests.Controls
Assembly: DeltaEngine.Scenes.Tests (in DeltaEngine.Scenes.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void HiddenControlDoesNotRespondToClick()
Examples

[Test, CloseAfterFirstFrame]
public void HiddenControlDoesNotRespondToClick()
{
    if (!IsMockResolver)
        return; //ncrunch: no coverage
    button.IsVisible = false;
    bool clicked = false;
    button.Clicked += () => clicked = true;
    PressAndReleaseMouse(new Vector2D(0.53f, 0.52f), new Vector2D(0.53f, 0.52f));
    Assert.IsFalse(clicked);
    Assert.IsFalse(button.State.IsInside);
    Assert.AreEqual(Vector2D.Zero, button.State.RelativePointerPosition);
}
See Also