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

◆ AddNewTip()

void Terraria.GameContent.UI.GameTipsDisplay.AddNewTip ( double currentTime)
inlineprivate

Definition at line 218 of file GameTipsDisplay.cs.

219 {
220 string textKey = "UI.Back";
223 {
224 list.RemoveAll((GameTipData tip) => tip.Mod == null && tip.TipText.Key.StartsWith("LoadingTips_Keyboard"));
225 }
226 else
227 {
228 list.RemoveAll((GameTipData tip) => tip.Mod == null && tip.TipText.Key.StartsWith("LoadingTips_GamePad"));
229 }
230 if (_lastTip != null)
231 {
232 list.RemoveAll((GameTipData tip) => tip.TipText == _lastTip);
233 }
234 list.RemoveAll((GameTipData tip) => !tip.isVisible);
235 string key = (_lastTip = ((list.Count != 0) ? list[Main.rand.Next(list.Count)].TipText : LocalizedText.Empty)).Key;
236 if (Language.Exists(key))
237 {
238 textKey = key;
239 }
240 _currentTips.Add(new GameTip(textKey, currentTime));
241 }
static bool Exists(string key)
Checks if a LocalizedText with the provided key has been registered or not. This can be used to avoid...
Definition Language.cs:76
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12
static readonly LocalizedText Empty
Contains the localization value corresponding to a key for the current game language....
Mod Mod
The mod instance this tip belongs to. This value is null for vanilla tips.
Wrapper class for a LocalizedText and visibility field that has intended use with modification of Gam...

References Terraria.GameContent.UI.GameTipsDisplay._currentTips, Terraria.GameContent.UI.GameTipsDisplay._lastTip, Terraria.GameContent.UI.GameTipsDisplay.allTips, Terraria.Localization.LocalizedText.Empty, Terraria.Localization.Language.Exists(), Terraria.ModLoader.GameTipData.isVisible, Terraria.Localization.LocalizedText.Key, Terraria.ModLoader.GameTipData.Mod, Terraria.Main.rand, Terraria.ModLoader.GameTipData.TipText, and Terraria.GameInput.PlayerInput.UsingGamepad.

Referenced by Terraria.GameContent.UI.GameTipsDisplay.Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: