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

◆ UpdateSliderAndShowMultiplierMouseOver()

void Terraria.GameContent.Creative.CreativePowers.SpawnRateSliderPerPlayerPower.UpdateSliderAndShowMultiplierMouseOver ( UIElement affectedElement)
inlineprivate

Definition at line 1718 of file CreativePowers.cs.

1719 {
1720 if (affectedElement.IsMouseHovering)
1721 {
1722 string originalText = "x" + RemapSliderValueToPowerValue(GetSliderValue()).ToString("F2");
1723 if (GetShouldDisableSpawnsFor(Main.myPlayer))
1724 {
1725 originalText = Language.GetTextValue(_powerNameKey + "EnemySpawnsDisabled");
1726 }
1727 CreativePowersHelper.AddPermissionTextIfNeeded(this, ref originalText);
1728 Main.instance.MouseTextNoOverride(originalText, 0, 0);
1729 }
1730 }
static string GetTextValue(string key)
Retrieves the text value for a specified localization key. The text returned will be for the currentl...
Definition Language.cs:35
Contains methods to access or retrieve localization values. The Localization Guideteaches more about ...
Definition Language.cs:12

References Terraria.GameContent.Creative.CreativePowers.APerPlayerSliderPower._powerNameKey, Terraria.GameContent.Creative.CreativePowersHelper.AddPermissionTextIfNeeded(), Terraria.GameContent.Creative.CreativePowers.SpawnRateSliderPerPlayerPower.GetShouldDisableSpawnsFor(), Terraria.GameContent.Creative.CreativePowers.APerPlayerSliderPower.GetSliderValue(), Terraria.Localization.Language.GetTextValue(), Terraria.Main.instance, Terraria.Main.myPlayer, and Terraria.GameContent.Creative.CreativePowers.SpawnRateSliderPerPlayerPower.RemapSliderValueToPowerValue().

Referenced by Terraria.GameContent.Creative.CreativePowers.SpawnRateSliderPerPlayerPower.ProvideSlider().

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