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

◆ CreateSubcategoryButton< T >()

GroupOptionButton< int > Terraria.GameContent.UI.States.UICreativePowersMenu.CreateSubcategoryButton< T > ( ref CreativePowerUIElementRequestInfo request,
int subcategoryDepth,
string subcategoryName,
int subcategoryIndex,
int currentSelectedInSubcategory,
Dictionary< int, GroupOptionButton< int > > subcategoryButtons,
Dictionary< int, UIElement > slidersSet )
inlineprivate
Type Constraints
T :ICreativePower 
T :IProvideSliderElement 
T :IPowerSubcategoryElement 

Definition at line 369 of file UICreativePowersMenu.cs.

370 {
371 T power = CreativePowerManager.Instance.GetPower<T>();
372 UIElement uIElement = power.ProvideSlider();
373 uIElement.Left = new StyleDimension(20 + subcategoryDepth * 60, 0f);
375 uIElement.SetSnapPoint(subcategoryName, 0, new Vector2(0f, 0.5f), new Vector2(28f, 0f));
378 return groupOptionButton;
379 }
static void UpdateUnlockStateByPower(ICreativePower power, UIElement button, Color colorWhenSelected)

References Terraria.GameContent.Creative.CreativePowersHelper.CommonSelectedColor, Terraria.GameContent.Creative.CreativePowerManager.Instance, Terraria.GameContent.Creative.CreativePowersHelper.UpdateUnlockStateByPower(), and Microsoft.Xna.Framework.Graphics.Vector2.