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

◆ ProvidePowerButtons()

void Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.ProvidePowerButtons ( CreativePowerUIElementRequestInfo info,
List< UIElement > elements )
inlineinherited

Implements Terraria.GameContent.Creative.ICreativePower.

Definition at line 503 of file CreativePowers.cs.

504 {
505 GroupOptionButton<bool> groupOptionButton = CreativePowersHelper.CreateToggleButton(info);
506 CreativePowersHelper.UpdateUnlockStateByPower(this, groupOptionButton, Main.OurFavoriteColor);
508 groupOptionButton.OnLeftClick += button_OnClick;
509 groupOptionButton.OnUpdate += button_OnUpdate;
510 elements.Add(groupOptionButton);
511 }
void button_OnClick(UIMouseEvent evt, UIElement listeningElement)

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.button_OnClick(), Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.button_OnUpdate(), Terraria.GameContent.Creative.CreativePowersHelper.CreateToggleButton(), Terraria.GameContent.Creative.CreativePowers.ASharedTogglePower.CustomizeButton(), System.info, Terraria.Main.OurFavoriteColor, and Terraria.GameContent.Creative.CreativePowersHelper.UpdateUnlockStateByPower().