public void UpdateFromSource(IKeyboardInputSource source) { if (source == null) return; this.HasFocus = source.HasFocus; this.KeyRepeat = source.KeyRepeat; this.KeyRepeatCount = source.KeyRepeatCounter; for (int i = 0; i < this.KeyPressed.Length; i++) { this.KeyPressed[i] = source[(Key)i]; } }
public void UpdateFromSource(IKeyboardInputSource source) { this.IsAvailable = source != null ? source.IsAvailable : false; if (source == null) return; this.CharInput = source.CharInput ?? string.Empty; for (int i = 0; i < this.KeyPressed.Length; i++) { this.KeyPressed[i] = source[(Key)i]; } }
public void UpdateFromSource(IKeyboardInputSource source) { this.IsAvailable = source != null ? source.IsAvailable : false; if (source == null) return; this.KeyRepeat = source.KeyRepeat; this.KeyRepeatCount = source.KeyRepeatCounter; for (int i = 0; i < this.KeyPressed.Length; i++) { this.KeyPressed[i] = source[(Key)i]; } }
public void UpdateFromSource(IKeyboardInputSource source) { this.IsAvailable = source != null ? source.IsAvailable : false; if (source == null) { return; } this.CharInput = source.CharInput ?? string.Empty; for (int i = 0; i < this.KeyPressed.Length; i++) { this.KeyPressed[i] = source[(Key)i]; } }
public void UpdateFromSource(IKeyboardInputSource source) { if (source == null) { return; } this.HasFocus = source.HasFocus; this.KeyRepeat = source.KeyRepeat; this.KeyRepeatCount = source.KeyRepeatCounter; for (int i = 0; i < this.KeyPressed.Length; i++) { this.KeyPressed[i] = source[(Key)i]; } }
public void UpdateFromSource(IKeyboardInputSource source) { this.IsAvailable = source != null ? source.IsAvailable : false; if (source == null) { return; } this.KeyRepeat = source.KeyRepeat; this.KeyRepeatCount = source.KeyRepeatCounter; for (int i = 0; i < this.KeyPressed.Length; i++) { this.KeyPressed[i] = source[(Key)i]; } }
/// <summary> /// Assigns a new input source for keyboard input. /// </summary> /// <param name="source"></param> public static void SetInputSource(IKeyboardInputSource source) { keyboard.Source = source; }
// Maintain list of connected input devices that the framework can use // such as keyboard, mouse, gamepads, accelerometer, orientation sensor etc // GamePad // Supports gamepad? // Touch // Mouse public InputManager(IKeyboard keyboard, IKeyboardInputSource keyboardInputSource) { this.keyboard = keyboard; this.keyboardDeviceAdapter = keyboardInputSource; }