using System; using Azimuth; using Blacklight.Core; using Blacklight.Core.Cameras; using Clave; namespace Glass.Testbed { /// /// Takes no input, and can be made to throw on the next press. /// public class FaultyInput : IInputConsumer { public bool Armed; public bool PointerDown(PointerInput input) { if (Armed) { Armed = false; throw new InvalidOperationException("A test exception from an input handler."); } return false; } public bool PointerMove(PointerInput input) => false; public bool PointerUp(PointerInput input) => false; public bool Wheel(Scalar ticks, Vector pixelPos) => false; public bool KeyDown(KeyboardSnapshot keyboard) => false; public bool KeyUp(KeyboardSnapshot keyboard) => false; public void SyncKeys(KeyboardSnapshot keyboard) { } public void CancelKeys() { } } }