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

◆ CreateCategoryButton< T >()

static GroupOptionButton< T > Terraria.GameContent.Creative.CreativePowersHelper.CreateCategoryButton< T > ( CreativePowerUIElementRequestInfo info,
T option,
T currentOption )
inlinestatic
Type Constraints
T :IConvertible 
T :IEquatable<T> 

Definition at line 110 of file CreativePowersHelper.cs.

111 {
112 GroupOptionButton<T> groupOptionButton = new GroupOptionButton<T>(option, null, null, Color.White, null, 0.8f);
113 groupOptionButton.Width = new StyleDimension(info.PreferredButtonWidth, 0f);
114 groupOptionButton.Height = new StyleDimension(info.PreferredButtonHeight, 0f);
115 groupOptionButton.ShowHighlightWhenSelected = false;
116 groupOptionButton.SetCurrentOption(currentOption);
117 groupOptionButton.SetColorsBasedOnSelectionState(new Color(152, 175, 235), Colors.InventoryDefaultColor, 1f, 0.7f);
118 return groupOptionButton;
119 }
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.