private void ColorArrayEditor_ColorSelected(object sender, EventArgs e) { selectedColorArray = (ColorArrayEditor)sender; // deselect the others if (color0ArrayEditor != selectedColorArray) { color0ArrayEditor.Deselect(); } if (alpha0ArrayEditor != selectedColorArray) { alpha0ArrayEditor.Deselect(); } if (color1ArrayEditor != selectedColorArray) { color1ArrayEditor.Deselect(); } if (alpha1ArrayEditor != selectedColorArray) { alpha1ArrayEditor.Deselect(); } if (scaleArrayEditor != selectedColorArray) { scaleArrayEditor.Deselect(); } selectedColorConstant = null; constant0Panel.DeselectPanel(); constant1Panel.DeselectPanel(); // push selected color to color editor colorEditor.LoadColor(selectedColorArray.SelectedColor, selectedColorArray.ColorArray.IsAlpha, selectedColorArray.ColorArray.Timed); colorEditor.Visible = true; }
private void ColorConstantPanel_ColorSelected(object sender, EventArgs e) { selectedColorConstant = (ColorConstantPanel)sender; // deselect the others selectedColorArray = null; color0ArrayEditor.Deselect(); alpha0ArrayEditor.Deselect(); color1ArrayEditor.Deselect(); alpha1ArrayEditor.Deselect(); scaleArrayEditor.Deselect(); if (constant0Panel != selectedColorConstant) { constant0Panel.DeselectPanel(); } if (constant1Panel != selectedColorConstant) { constant1Panel.DeselectPanel(); } colorEditor.LoadColor(selectedColorConstant.SelectedColor, false, false); colorEditor.Visible = true; }