void ColourButtonClicked(Shape.Figures_Colours colour) { if (coloursList.Contains(colour)) { coloursList.Remove(colour); } else { coloursList.Add(colour); } ButtonDrawBorder(); }
public static Color ShapeColorToUnityColor(Shape.Figures_Colours shapeColor) { Color result = Color.white; switch (shapeColor) { case Shape.Figures_Colours.Light_Blue: result = new Color(0, 0, 1); break; case Shape.Figures_Colours.Dark_Blue: result = new Color(0, 0, 0.627451f); break; case Shape.Figures_Colours.Light_Green: result = new Color(0, 1, 0); break; case Shape.Figures_Colours.Dark_Green: result = new Color(0.07058824f, 0.372549f, 0.1568628f); break; case Shape.Figures_Colours.Violet: result = new Color(0.6392157f, 0.2862745f, 0.6392157f); break; case Shape.Figures_Colours.Pink: result = new Color(1, 0.5019608f, 0.7529412f); break; case Shape.Figures_Colours.Red: result = new Color(1, 0, 0); break; case Shape.Figures_Colours.Yellow: result = new Color(1, 1, 0); break; case Shape.Figures_Colours.Orange: result = new Color(1, 0.5311697f, 0.05490196f); break; default: throw new ArgumentOutOfRangeException("shapeColor", shapeColor, null); } return(result); }