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

◆ Load()

static void Terraria.GameInput.PlayerInput.Load ( )
inlinestatic

Definition at line 582 of file PlayerInput.cs.

583 {
584 Main.InputProfiles.Load();
586 string currentValue = null;
587 Main.InputProfiles.Get("Selected Profile", ref currentValue);
588 List<string> allKeys = Main.InputProfiles.GetAllKeys();
589 for (int i = 0; i < allKeys.Count; i++)
590 {
591 string text = allKeys[i];
592 if (text == "Selected Profile" || string.IsNullOrEmpty(text))
593 {
594 continue;
595 }
597 Main.InputProfiles.Get(text, ref currentValue2);
598 if (currentValue2.Count > 0)
599 {
600 PlayerInputProfile playerInputProfile = new PlayerInputProfile(text);
603 {
605 }
606 }
607 }
608 if (dictionary.Count > 0)
609 {
611 if (!string.IsNullOrEmpty(currentValue) && Profiles.ContainsKey(currentValue))
612 {
613 SetSelectedProfile(currentValue);
614 }
615 else
616 {
617 SetSelectedProfile(Profiles.Keys.First());
618 }
619 }
620 }
static void SetSelectedProfile(string name)
static Dictionary< string, PlayerInputProfile > Profiles

References System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.dictionary, System.Collections.Generic.Dictionary< TKey, TValue >.Initialize(), Terraria.Main.InputProfiles, Terraria.GameInput.PlayerInput.SetSelectedProfile(), and System.text.

Referenced by Terraria.Main.LoadSettings().