Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckRebindingProcessKeyboard()

static bool Terraria.GameInput.PlayerInput.CheckRebindingProcessKeyboard ( string newKey)
inlinestaticprivate

Definition at line 1397 of file PlayerInput.cs.

1398 {
1400 if (CurrentlyRebinding && _listeningInputMode == InputMode.Keyboard)
1401 {
1405 if (CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus[ListeningTrigger].Contains(newKey))
1406 {
1407 CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus[ListeningTrigger].Remove(newKey);
1408 }
1409 else
1410 {
1411 CurrentProfile.InputModes[InputMode.Keyboard].KeyStatus[ListeningTrigger] = new List<string> { newKey };
1412 }
1413 ListenFor(null, InputMode.Keyboard);
1414 Main.blockKey = newKey;
1415 Main.blockInput = false;
1416 Main.ChromaPainter.CollectBoundKeys();
1417 }
1418 if (CurrentlyRebinding && _listeningInputMode == InputMode.KeyboardUI)
1419 {
1423 if (CurrentProfile.InputModes[InputMode.KeyboardUI].KeyStatus[ListeningTrigger].Contains(newKey))
1424 {
1425 CurrentProfile.InputModes[InputMode.KeyboardUI].KeyStatus[ListeningTrigger].Remove(newKey);
1426 }
1427 else
1428 {
1429 CurrentProfile.InputModes[InputMode.KeyboardUI].KeyStatus[ListeningTrigger] = new List<string> { newKey };
1430 }
1431 ListenFor(null, InputMode.KeyboardUI);
1432 Main.blockKey = newKey;
1433 Main.blockInput = false;
1434 Main.ChromaPainter.CollectBoundKeys();
1435 }
1437 if (PlayerInput.OnBindingChange != null)
1438 {
1439 PlayerInput.OnBindingChange();
1440 }
1441 return NavigatorRebindingLock > 0;
1442 }
static void PlaySound(int type, Vector2 position, int style=1)
static InputMode _listeningInputMode
static PlayerInputProfile CurrentProfile
static void ListenFor(string triggerName, InputMode inputmode)

References Terraria.GameInput.PlayerInput._canReleaseRebindingLock, Terraria.GameInput.PlayerInput._listeningInputMode, Terraria.GameInput.PlayerInput._memoOfLastPoint, Terraria.Main.ChromaPainter, Terraria.GameInput.PlayerInput.CurrentlyRebinding, Terraria.UI.Gamepad.UILinkPointNavigator.CurrentPoint, Terraria.GameInput.PlayerInput.CurrentProfile, Terraria.GameInput.PlayerInput.FixDerpedRebinds(), Terraria.GameInput.PlayerInput.ListenFor(), Terraria.GameInput.PlayerInput.ListeningTrigger, Terraria.GameInput.PlayerInput.NavigatorRebindingLock, Terraria.GameInput.PlayerInput.OnBindingChange, and Terraria.Audio.SoundEngine.PlaySound().

Referenced by Terraria.GameInput.PlayerInput.KeyboardInput().