Esempio n. 1
0
        // Update is called once per frame
        public void Update()
        {
            if (selectedButtons.Contains(this))
            {
                CustomInput CurrentInput = InputControl.CurrentInput(ignoreMouseMovement, useKeyModifiers);

                if (CurrentInput != null)
                {
                    if (CurrentInput.modifiers == KeyModifier.NoModifier && CurrentInput is KeyboardInput &&
                        ((KeyboardInput)CurrentInput).key == KeyCode.Backspace)    //Allows users to use the BACKSPACE to set "None" to their controls.
                    {
                        SetInput(CreateDefaultMapping());
                    }
                    else if (!(CurrentInput is MouseInput))
                    {
                        SetInput(CurrentInput);
                    }
                    else
                    {
                        Deselect();
                    }
                }
            }
        }