public static GroupOptionButton <T> CreateCategoryButton <T>(CreativePowerUIElementRequestInfo info, T option, T currentOption) where T : IConvertible, IEquatable <T> { GroupOptionButton <T> groupOptionButton = new GroupOptionButton <T>(option, null, null, Color.White, null, 0.8f); groupOptionButton.Width = new StyleDimension(info.PreferredButtonWidth, 0f); groupOptionButton.Height = new StyleDimension(info.PreferredButtonHeight, 0f); groupOptionButton.ShowHighlightWhenSelected = false; groupOptionButton.SetCurrentOption(currentOption); groupOptionButton.SetColorsBasedOnSelectionState(new Color(152, 175, 235), Colors.InventoryDefaultColor, 1f, 0.7f); return(groupOptionButton); }
public static GroupOptionButton <bool> CreateSimpleButton(CreativePowerUIElementRequestInfo info) { GroupOptionButton <bool> groupOptionButton = new GroupOptionButton <bool>(option: true, null, null, Color.White, null, 0.8f); groupOptionButton.Width = new StyleDimension(info.PreferredButtonWidth, 0f); groupOptionButton.Height = new StyleDimension(info.PreferredButtonHeight, 0f); groupOptionButton.ShowHighlightWhenSelected = false; groupOptionButton.SetCurrentOption(option: false); groupOptionButton.SetColorsBasedOnSelectionState(new Color(152, 175, 235), Colors.InventoryDefaultColor, 1f, 0.7f); return(groupOptionButton); }
public static GroupOptionButton <bool> CreateToggleButton( CreativePowerUIElementRequestInfo info) { GroupOptionButton <bool> groupOptionButton = new GroupOptionButton <bool>(true, (LocalizedText)null, (LocalizedText)null, Color.White, (string)null, 0.8f, 0.5f, 10f); groupOptionButton.Width = new StyleDimension((float)info.PreferredButtonWidth, 0.0f); groupOptionButton.Height = new StyleDimension((float)info.PreferredButtonHeight, 0.0f); groupOptionButton.ShowHighlightWhenSelected = false; groupOptionButton.SetCurrentOption(false); groupOptionButton.SetColorsBasedOnSelectionState(new Color(152, 175, 235), Colors.InventoryDefaultColor, 1f, 0.7f); groupOptionButton.SetColorsBasedOnSelectionState(Main.OurFavoriteColor, Colors.InventoryDefaultColor, 1f, 0.7f); return(groupOptionButton); }