// Methods /// Constructor public HTextBox(int x, int y, int maxChar = 12, Boolean hide = false, int width = 100, int height = 30) : base(x, y, width, height) { maxCharacters = maxChar; hideText = hide; componentColor = new Color[] { Color.CadetBlue, Color.LightSlateGray }; contentColor = new Color[] { Color.White, Color.WhiteSmoke }; label = new HLabel(componentRectangle, "", Font.Text); label.setColor(contentColor); }
// Methods /// Constructor public HButton(string buttonText = "", int x = 10, int y = 10, int width = 120, int height = 30) : base(x, y, width, height) { componentColor = new Color[] { Color.CadetBlue, Color.LightSlateGray }; contentColor = new Color[] { Color.White, Color.WhiteSmoke }; label = new HLabel(componentRectangle, buttonText, Font.Text); label.setColor(contentColor); setHoverSound = Sound.buttonHover; setClickSound = Sound.buttonClick; }
/// Set color public override void setColor(Color[] component, Color[] content) { base.setColor(component, content); label.setColor(content); }