public void releaseClick() { hueBar.release(0, 0); saturationBar.release(0, 0); valueBar.release(0, 0); recentSliderBar = null; }
public ColorPicker(int x, int y) { this.hueBar = new SliderBar(0, 0, 50); this.saturationBar = new SliderBar(0, 20, 50); this.valueBar = new SliderBar(0, 40, 50); this.bounds = new Rectangle(x, y, SliderBar.defaultWidth, 60); }
public void releaseClick() { this.hueBar.release(0, 0); this.saturationBar.release(0, 0); this.valueBar.release(0, 0); this.recentSliderBar = (SliderBar)null; }
public ColorPicker(string name, int x, int y) { Name = name; hueBar = new SliderBar(0, 0, 50); saturationBar = new SliderBar(0, 20, 50); valueBar = new SliderBar(0, 40, 50); bounds = new Rectangle(x, y, SliderBar.defaultWidth, 60); }
public Color click(int x, int y) { if (bounds.Contains(x, y)) { x -= bounds.X; y -= bounds.Y; if (hueBar.bounds.Contains(x, y)) { hueBar.click(x, y); recentSliderBar = hueBar; } if (saturationBar.bounds.Contains(x, y)) { recentSliderBar = saturationBar; saturationBar.click(x, y); } if (valueBar.bounds.Contains(x, y)) { recentSliderBar = valueBar; valueBar.click(x, y); } } return(getSelectedColor()); }
public Color click(int x, int y) { if (this.bounds.Contains(x, y)) { x -= this.bounds.X; y -= this.bounds.Y; if (this.hueBar.bounds.Contains(x, y)) { this.hueBar.click(x, y); this.recentSliderBar = this.hueBar; } if (this.saturationBar.bounds.Contains(x, y)) { this.recentSliderBar = this.saturationBar; this.saturationBar.click(x, y); } if (this.valueBar.bounds.Contains(x, y)) { this.recentSliderBar = this.valueBar; this.valueBar.click(x, y); } } return(this.getSelectedColor()); }
public void changeValue(int amount) { valueBar.changeValueBy(amount); recentSliderBar = valueBar; }
public void changeSaturation(int amount) { saturationBar.changeValueBy(amount); recentSliderBar = saturationBar; }
public void changeValue(int amount) { this.valueBar.changeValueBy(amount); this.recentSliderBar = this.valueBar; }
public void changeSaturation(int amount) { this.saturationBar.changeValueBy(amount); this.recentSliderBar = this.saturationBar; }