// Token: 0x06003901 RID: 14593 RVA: 0x000E7788 File Offset: 0x000E5988 public void Update() { if (!this.editing) { return; } if (this.exit < 2) { this.exit++; return; } if (Input.GetKeyDown(KeyCode.Escape) || (this.WasPressed(XboxControllerInput.Button.Start) && this.currentKeys.Count > 0)) { this.editing = false; SuspensionManager.ResumeAll(); this.SetKeys(this.currentKeys.ToArray()); PlayerInputRebinding.WriteControllerRebindSettings(); PlayerInput.Instance.RefreshControlScheme(); this.owner.SetFakeTooltip(this.owner.DefaultTooltip); return; } PlayerInputRebinding.ControllerButton?pressedButtonAsBind = this.GetPressedButtonAsBind(); if (pressedButtonAsBind != null && !this.currentKeys.Contains(pressedButtonAsBind.Value)) { this.currentKeys.Add(pressedButtonAsBind.Value); this.UpdateMessageBox(); } foreach (XboxControllerInput.Button button in this.allButtons) { this.buttonsPressed[(int)button] = XboxControllerInput.GetButton(button, -1); } }
// Token: 0x06000EAF RID: 3759 RVA: 0x0000CADB File Offset: 0x0000ACDB public void RefreshControlScheme() { this.ClearControls(); this.AddControllerControls(); this.AddXboxOneControls(); this.AddKeyboardControls(); PlayerInputRebinding.RefreshControllerButtonRemappings(); }
private void ResetKeybinds() { PlayerInputRebinding.SetDefaultKeyBindingSettings(); PlayerInput instance = PlayerInput.Instance; if (instance != null) { instance.RefreshControlScheme(); } KeybindControl[] componentsInChildren = OptionsScreen.Instance.transform.GetComponentsInChildren <KeybindControl>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Reset(); } PlayerInputRebinding.WriteKeyRebindSettings(); }
// Token: 0x0600389A RID: 14490 RVA: 0x000E70B8 File Offset: 0x000E52B8 public void Update() { if (!this.editing) { return; } if (this.exit < 2) { this.exit++; return; } if (Input.GetKeyDown(KeyCode.Return) && this.currentKeys.Count > 0) { this.editing = false; SuspensionManager.ResumeAll(); this.SetKeys(this.currentKeys.ToArray()); PlayerInputRebinding.WriteKeyRebindSettings(); PlayerInput.Instance.RefreshControlScheme(); this.owner.SetFakeTooltip(this.owner.DefaultTooltip); return; } if (Input.GetKeyDown(KeyCode.Backspace)) { if (this.currentKeys.Count > 0) { this.currentKeys.RemoveAt(this.currentKeys.Count - 1); this.UpdateMessageBox(); return; } } else if (Input.anyKeyDown) { foreach (object obj in Enum.GetValues(typeof(KeyCode))) { KeyCode keyCode3 = (KeyCode)obj; if (Input.GetKeyDown(keyCode3) && !this.currentKeys.Contains(keyCode3)) { this.currentKeys.Add(keyCode3); this.UpdateMessageBox(); } } } }