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

◆ ProvidePowerButtons()

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

Implements Terraria.GameContent.Creative.ICreativePower.

Definition at line 161 of file CreativePowers.cs.

162 {
163 GroupOptionButton<bool> groupOptionButton = CreativePowersHelper.CreateToggleButton(info);
164 CreativePowersHelper.UpdateUnlockStateByPower(this, groupOptionButton, Main.OurFavoriteColor);
165 groupOptionButton.Append(CreativePowersHelper.GetIconImage(_iconLocation));
166 groupOptionButton.OnLeftClick += button_OnClick;
167 groupOptionButton.OnUpdate += button_OnUpdate;
168 elements.Add(groupOptionButton);
169 }
void button_OnClick(UIMouseEvent evt, UIElement listeningElement)

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