コード例 #1
0
			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];
				}
			}
コード例 #2
0
ファイル: KeyboardInput.cs プロジェクト: Scottyaim/duality
			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];
				}
			}
コード例 #3
0
ファイル: KeyboardInput.cs プロジェクト: KSLcom/duality
			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];
				}
			}
コード例 #4
0
ファイル: KeyboardInput.cs プロジェクト: ykafia/duality
            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];
                }
            }
コード例 #5
0
 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];
     }
 }
コード例 #6
0
            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];
                }
            }
コード例 #7
0
		/// <summary>
		/// Assigns a new input source for keyboard input.
		/// </summary>
		/// <param name="source"></param>
		public static void SetInputSource(IKeyboardInputSource source)
		{
			keyboard.Source = source;
		}
コード例 #8
0
        // 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;
        }