public override string GetDescription() { return(string.Format( "Keyboard {0}", InputManagerHelpers.GetMappableKeysDescription(keyCode) )); }
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(); } }
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; } }