private void InitializeSimulatedInputSource() { if (InputSourceSimulated != null) { Input.Sources.Clear(); Input.Sources.Add(InputSourceSimulated); MouseSimulated = InputSourceSimulated.AddMouse(); KeyboardSimulated = InputSourceSimulated.AddKeyboard(); } }
public GameTestingSystem(IServiceRegistry registry) : base(registry) { DrawOrder = int.MaxValue; Enabled = true; Visible = true; // Switch to simulated input var input = registry.GetSafeServiceAs <InputManager>(); input.Sources.Clear(); input.Sources.Add(inputSourceSimulated = new InputSourceSimulated()); keyboardSimulated = inputSourceSimulated.AddKeyboard(); mouseSimulated = inputSourceSimulated.AddMouse(); }