Пример #1
0
 public void releaseClick()
 {
     hueBar.release(0, 0);
     saturationBar.release(0, 0);
     valueBar.release(0, 0);
     recentSliderBar = null;
 }
Пример #2
0
 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);
 }
Пример #3
0
 public void releaseClick()
 {
     this.hueBar.release(0, 0);
     this.saturationBar.release(0, 0);
     this.valueBar.release(0, 0);
     this.recentSliderBar = (SliderBar)null;
 }
Пример #4
0
 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);
 }
Пример #5
0
 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());
 }
Пример #6
0
 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());
 }
Пример #7
0
 public void changeValue(int amount)
 {
     valueBar.changeValueBy(amount);
     recentSliderBar = valueBar;
 }
Пример #8
0
 public void changeSaturation(int amount)
 {
     saturationBar.changeValueBy(amount);
     recentSliderBar = saturationBar;
 }
Пример #9
0
 public void changeValue(int amount)
 {
     this.valueBar.changeValueBy(amount);
     this.recentSliderBar = this.valueBar;
 }
Пример #10
0
 public void changeSaturation(int amount)
 {
     this.saturationBar.changeValueBy(amount);
     this.recentSliderBar = this.saturationBar;
 }