/// <summary> /// Creates a defualt Color Select /// </summary> public ColorSelect() { this.Colors = GetDefault(); ReapetColumns = Colors.Count; BoxSize = new Vector2(50, 50); Margins = new Vector2(10, 10); Type = ColorSelcetType.Static; this.SelectedIndex = -1; Arrange(); }
/// <summary> /// Creates a select of colors /// </summary> /// <param name="colors">The Colors to be selectable</param> /// <param name="reapet">How many boxes to show in a row</param> public ColorSelect(List <Color> colors, Vector2 position, int reapet, Vector2 boxSize, Vector2 margin, ColorSelcetType type) { this.Position = position; this.Colors = colors; ShowNames = false; this.ReapetColumns = reapet; this.BoxSize = boxSize; this.Margins = margin; this.Type = type; this.SelectedIndex = -1; IsOpen = false; if (Type == ColorSelcetType.Openable) { SelectedIndex = 0; } Arrange(); }