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

◆ ProvidePowerButtons()

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

Implements Terraria.GameContent.Creative.ICreativePower.

Definition at line 419 of file CreativePowers.cs.

420 {
421 GroupOptionButton<bool> groupOptionButton = CreativePowersHelper.CreateSimpleButton(info);
422 CreativePowersHelper.UpdateUnlockStateByPower(this, groupOptionButton, CreativePowersHelper.CommonSelectedColor);
423 groupOptionButton.Append(CreativePowersHelper.GetIconImage(_iconLocation));
424 groupOptionButton.OnLeftClick += button_OnClick;
425 groupOptionButton.OnUpdate += button_OnUpdate;
426 elements.Add(groupOptionButton);
427 }
void button_OnClick(UIMouseEvent evt, UIElement listeningElement)

References Terraria.GameContent.Creative.CreativePowers.ASharedButtonPower._iconLocation, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), Terraria.GameContent.Creative.CreativePowers.ASharedButtonPower.button_OnClick(), Terraria.GameContent.Creative.CreativePowers.ASharedButtonPower.button_OnUpdate(), Terraria.GameContent.Creative.CreativePowersHelper.CommonSelectedColor, Terraria.GameContent.Creative.CreativePowersHelper.CreateSimpleButton(), Terraria.GameContent.Creative.CreativePowersHelper.GetIconImage(), System.info, and Terraria.GameContent.Creative.CreativePowersHelper.UpdateUnlockStateByPower().