public override void ButtonActions() { switch (menuOptions[cursorIndex, 0].ToLower()) { case "control type:": { if (menuOptions[0, 1] == "Gamepad") { menuOptions[0, 1] = "Keyboard"; ControlManager.UseGamepad = false; ResetMenuOptions(true); } else { if (ControlManager.GamepadReady) { menuOptions[0, 1] = "Gamepad"; ControlManager.UseGamepad = true; ResetMenuOptions(false); } } } break; case "action 1 / fire / confirm": InitInputCheck(RebindableKeys.Action1); break; case "action 2 / switch weapons / back": InitInputCheck(RebindableKeys.Action2); break; case "action 3": InitInputCheck(RebindableKeys.Action3); break; case "up": InitInputCheck(RebindableKeys.Up); break; case "down": InitInputCheck(RebindableKeys.Down); break; case "left": InitInputCheck(RebindableKeys.Left); break; case "right": InitInputCheck(RebindableKeys.Right); break; case "pause / access menu": InitInputCheck(RebindableKeys.Pause); break; case "access inventory": InitInputCheck(RebindableKeys.Inventory); break; case "access map": InitInputCheck(RebindableKeys.Map); break; case "access mission log": InitInputCheck(RebindableKeys.Missions); break; case "access help screen": InitInputCheck(RebindableKeys.Help); break; case "reset default keys": ControlManager.SetDefaultControls(); ResetMenuOptions(menuOptions[0, 1] == "Keyboard"); PlaySelectSound(); break; case "back": optionsMenuState.LeaveSubState(); OnLeave(); PlayLowPitchSelectSound(); break; } }