public override string GetDescription()
 {
     return(string.Format(
                "Mouse Button {0}",
                InputManagerHelpers.GetMouseButtonDescription(button)
                ));
 }
 public override string GetDescription()
 {
     return(string.Format(
                "Joystick {0}",
                InputManagerHelpers.GetXboxJoystickAxisDescription(axis)
                ));
 }
Пример #3
0
 public override string GetDescription()
 {
     return(string.Format(
                "Keyboard {0}",
                InputManagerHelpers.GetMappableKeysDescription(keyCode)
                ));
 }
 public override string GetDescription()
 {
     return(string.Format(
                "Joystick D-Pad {0}",
                InputManagerHelpers.GetXboxJoystickDPadDescription(button)
                ));
 }
Пример #5
0
 public override string GetDescription()
 {
     return(string.Format(
                "Joystick D-Pad {0}/{1}",
                InputManagerHelpers.GetXboxJoystickDPadDescription(positiveButton),
                InputManagerHelpers.GetXboxJoystickDPadDescription(negativeButton)
                ));
 }
        protected void UpdateButtons()
        {
            buttonPositiveKey.label = positiveKey.HasValue ? InputManagerHelpers.GetMappableKeysDescription(positiveKey.Value) : string.Empty;
            buttonNegativeKey.label = negativeKey.HasValue ? InputManagerHelpers.GetMappableKeysDescription(negativeKey.Value) : string.Empty;

            if (positiveKey.HasValue && negativeKey.HasValue)
            {
                buttonOk.Enable();
            }
            else
            {
                buttonOk.Disable();
            }
        }
Пример #7
0
        protected void Update()
        {
            foreach (var mappableKey in allMappableKeys)
            {
                if (UnityEngine.Input.GetKeyDown((UnityEngine.KeyCode)mappableKey))
                {
                    selectedKey = mappableKey;
                    break;
                }
            }

            if (selectedKey.HasValue)
            {
                buttonOn.Enable();
                labelSelectedKey.text = InputManagerHelpers.GetMappableKeysDescription(selectedKey.Value);
            }
            else
            {
                buttonOn.Disable();
                labelSelectedKey.text = string.Empty;
            }
        }