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

◆ button_OnUpdate()

void Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.button_OnUpdate ( UIElement affectedElement)
inlineprivateinherited

Definition at line 519 of file CreativePowers.cs.

520 {
521 bool enabled = Enabled;
523 groupOptionButton.SetCurrentOption(enabled);
524 if (affectedElement.IsMouseHovering)
525 {
527 string originalText = Language.GetTextValue(buttonTextKey + (groupOptionButton.IsSelected ? "_Enabled" : "_Disabled"));
528 CreativePowersHelper.AddDescriptionIfNeeded(ref originalText, buttonTextKey + "_Description");
529 CreativePowersHelper.AddUnlockTextIfNeeded(ref originalText, GetIsUnlocked(), buttonTextKey + "_Unlock");
530 CreativePowersHelper.AddPermissionTextIfNeeded(this, ref originalText);
531 Main.instance.MouseTextNoOverride(originalText, 0, 0);
532 }
533 }
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.CreativePowersHelper.AddDescriptionIfNeeded(), Terraria.GameContent.Creative.CreativePowersHelper.AddPermissionTextIfNeeded(), Terraria.GameContent.Creative.CreativePowersHelper.AddUnlockTextIfNeeded(), Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.Enabled, Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.GetButtonTextKey(), Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.GetIsUnlocked(), Terraria.Localization.Language.GetTextValue(), and Terraria.Main.instance.

Referenced by Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.ProvidePowerButtons().

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