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

◆ CreateSimpleButton()

static GroupOptionButton< bool > Terraria.GameContent.Creative.CreativePowersHelper.CreateSimpleButton ( CreativePowerUIElementRequestInfo info)
inlinestatic

Definition at line 99 of file CreativePowersHelper.cs.

100 {
101 GroupOptionButton<bool> groupOptionButton = new GroupOptionButton<bool>(option: true, null, null, Color.White, null, 0.8f);
102 groupOptionButton.Width = new StyleDimension(info.PreferredButtonWidth, 0f);
103 groupOptionButton.Height = new StyleDimension(info.PreferredButtonHeight, 0f);
104 groupOptionButton.ShowHighlightWhenSelected = false;
105 groupOptionButton.SetCurrentOption(option: false);
106 groupOptionButton.SetColorsBasedOnSelectionState(new Color(152, 175, 235), Colors.InventoryDefaultColor, 1f, 0.7f);
107 return groupOptionButton;
108 }
void SetColorsBasedOnSelectionState(Color pickedColor, Color unpickedColor, float opacityPicked, float opacityNotPicked)
static readonly Color InventoryDefaultColor
Definition Colors.cs:93

References Microsoft.Xna.Framework.Graphics.Color, System.info, Terraria.ID.Colors.InventoryDefaultColor, Terraria.GameContent.UI.Elements.GroupOptionButton< T >.SetColorsBasedOnSelectionState(), Terraria.GameContent.UI.Elements.GroupOptionButton< T >.SetCurrentOption(), and Microsoft.Xna.Framework.Color.White.

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