public virtual void UpdateWithHSV(HSV hsv) { HSV hsvTemp; hsvTemp.S = 1; hsvTemp.H = hsv.H; hsvTemp.V = 1; RGBA rgb = CCControlUtils.RGBfromHSV(hsvTemp); Background.Color = new CCColor3B((byte)(rgb.R * 255.0f), (byte)(rgb.G * 255.0f), (byte)(rgb.B * 255.0f)); }
public void ColourSliderValueChanged(Object sender, CCControlEvent controlEvent) { Hsv.S = ((CCControlSaturationBrightnessPicker)sender).Saturation; Hsv.V = ((CCControlSaturationBrightnessPicker)sender).Brightness; RGBA rgb = CCControlUtils.RGBfromHSV(Hsv); // XXX fixed me if not correct base.Color = new CCColor3B((byte)(rgb.R * 255.0f), (byte)(rgb.G * 255.0f), (byte)(rgb.B * 255.0f)); // Send Control callback SendActionsForControlEvents(CCControlEvent.ValueChanged); }
public void HueSliderValueChanged(Object sender, CCControlEvent controlEvent) { Hsv.H = ((CCControlHuePicker)sender).Hue; RGBA rgb = CCControlUtils.RGBfromHSV(Hsv); // XXX fixed me if not correct base.Color = new CCColor3B((byte)(rgb.R * 255.0f), (byte)(rgb.G * 255.0f), (byte)(rgb.B * 255.0f)); // Send Control callback SendActionsForControlEvents(CCControlEvent.ValueChanged); UpdateControlPicker(); }