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

◆ button_OnUpdate()

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

Definition at line 513 of file CreativePowers.cs.

514 {
515 bool enabled = Enabled;
517 groupOptionButton.SetCurrentOption(enabled);
518 if (affectedElement.IsMouseHovering)
519 {
521 string originalText = Language.GetTextValue(buttonTextKey + (groupOptionButton.IsSelected ? "_Enabled" : "_Disabled"));
522 CreativePowersHelper.AddDescriptionIfNeeded(ref originalText, buttonTextKey + "_Description");
523 CreativePowersHelper.AddUnlockTextIfNeeded(ref originalText, GetIsUnlocked(), buttonTextKey + "_Unlock");
524 CreativePowersHelper.AddPermissionTextIfNeeded(this, ref originalText);
525 Main.instance.MouseTextNoOverride(originalText, 0, 0);
526 }
527 }
static string GetTextValue(string key)
Definition Language.cs:15

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().