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

◆ SupportGlyphs()

static string Terraria.Lang.SupportGlyphs ( string tooltip)
inlinestatic

Definition at line 522 of file Lang.cs.

523 {
524 if (tooltip.Contains("<right>"))
525 {
526 InputMode inputMode = InputMode.XBoxGamepad;
528 {
529 inputMode = InputMode.XBoxGamepadUI;
530 }
531 if (inputMode == InputMode.XBoxGamepadUI)
532 {
533 KeyConfiguration keyConfiguration = PlayerInput.CurrentProfile.InputModes[inputMode];
534 string text = PlayerInput.BuildCommand("", true, keyConfiguration.KeyStatus["MouseRight"]);
535 text = text.Replace(": ", "");
536 tooltip = tooltip.Replace("<right>", text);
537 }
538 else
539 {
540 tooltip = tooltip.Replace("<right>", Language.GetTextValue("Controls.RightClick"));
541 }
542 }
543 if (tooltip.Contains("<left>"))
544 {
545 InputMode inputMode2 = InputMode.XBoxGamepad;
547 {
548 inputMode2 = InputMode.XBoxGamepadUI;
549 }
550 if (inputMode2 == InputMode.XBoxGamepadUI)
551 {
552 KeyConfiguration keyConfiguration2 = PlayerInput.CurrentProfile.InputModes[inputMode2];
553 string text2 = PlayerInput.BuildCommand("", true, keyConfiguration2.KeyStatus["MouseLeft"]);
554 text2 = text2.Replace(": ", "");
555 tooltip = tooltip.Replace("<left>", text2);
556 }
557 else
558 {
559 tooltip = tooltip.Replace("<left>", Language.GetTextValue("Controls.LeftClick"));
560 }
561 }
562 return tooltip;
563 }
Dictionary< string, List< string > > KeyStatus
static string BuildCommand(string CommandText, bool Last, params List< string >[] Bindings)
static PlayerInputProfile CurrentProfile
static string GetTextValue(string key)
Definition Language.cs:15

References Terraria.GameInput.PlayerInput.BuildCommand(), Terraria.GameInput.PlayerInput.CurrentProfile, Terraria.Localization.Language.GetTextValue(), Terraria.GameInput.KeyConfiguration.KeyStatus, System.text, and Terraria.GameInput.PlayerInput.UsingGamepad.

Referenced by Terraria.GameContent.UI.GameTipsDisplay.GameTip.GameTip(), Terraria.Lang.InitializeLegacyLocalization(), and Terraria.Main.TextDisplayCache.PrepareCache().