public override void ApplySettings(ConfigUtils config) { if (this.Tag != null) { if (config.HasKey(this.Tag.ToString())) { this.Color = UI.UIObjects.Color.FromFormat(config.GetValue <uint>(this.Tag.ToString()), UI.UIObjects.Color.ColorFormat.RGBA); } } }
public SharpDXColorControl() : base() { this.color = new UI.UIObjects.Color(0, 0, 0, 0); this.TextChangedEvent += SharpDXColorControl_TextChangedEvent; this.DynamicWidth = false; this.FillParent = true; preview = new SharpDXButton(); preview.FillParent = true; preview.Text = ""; this.AddChildControl(preview); SetupChannel(ref this.A, "Alpha-channel", this.color.A); SetupChannel(ref this.R, "R-channel", this.color.R); SetupChannel(ref this.G, "G-channel", this.color.G); SetupChannel(ref this.B, "B-channel", this.color.B); this.Color = new UI.UIObjects.Color(1f, 1f, 1f, 1f); }
public static SharpDX.Color ColorEUCtoSDX(UI.UIObjects.Color color) { return(new SharpDX.Color(color.R, color.G, color.B, color.A)); }
void control_ValueChangedEvent(object sender, EventArgs e) { this.Color = new UI.UIObjects.Color(A.Value, R.Value, G.Value, B.Value); }