Fix color dialogs not working for params
This commit is contained in:
parent
1487422c38
commit
72f1feb51f
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -132,16 +132,14 @@ namespace FirstPlugin.Forms
|
|||||||
colorDialog.Color = pictureBox1.BackColor;
|
colorDialog.Color = pictureBox1.BackColor;
|
||||||
if (colorDialog.ShowDialog() == DialogResult.OK)
|
if (colorDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
activeParam.ValueFloat = new float[]
|
barSlider1.Value = colorDialog.Color.R / 255f;
|
||||||
{
|
barSlider2.Value = colorDialog.Color.G / 255f;
|
||||||
colorDialog.Color.R / 255,
|
barSlider3.Value = colorDialog.Color.B / 255f;
|
||||||
colorDialog.Color.G / 255,
|
|
||||||
colorDialog.Color.B / 255,
|
ApplyValueSingles();
|
||||||
};
|
|
||||||
barSlider1.Value = colorDialog.Color.R / 255;
|
if (OnPanelChanged != null)
|
||||||
barSlider2.Value = colorDialog.Color.G / 255;
|
OnPanelChanged(activeParam, this);
|
||||||
barSlider3.Value = colorDialog.Color.B / 255;
|
|
||||||
SetColor(activeParam.Name, activeParam.ValueFloat);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -192,9 +192,14 @@ namespace FirstPlugin.Forms
|
|||||||
colorDialog.Color = colorPB.BackColor;
|
colorDialog.Color = colorPB.BackColor;
|
||||||
if (colorDialog.ShowDialog() == DialogResult.OK)
|
if (colorDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
barSlider1.Value = colorDialog.Color.R / 255;
|
barSlider1.Value = colorDialog.Color.R / 255f;
|
||||||
barSlider2.Value = colorDialog.Color.G / 255;
|
barSlider2.Value = colorDialog.Color.G / 255f;
|
||||||
barSlider3.Value = colorDialog.Color.B / 255;
|
barSlider3.Value = colorDialog.Color.B / 255f;
|
||||||
|
|
||||||
|
ApplyValueSingles();
|
||||||
|
|
||||||
|
if (OnPanelChanged != null)
|
||||||
|
OnPanelChanged(activeParam, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +209,12 @@ namespace FirstPlugin.Forms
|
|||||||
colorDialog.Color = alphaPB.BackColor;
|
colorDialog.Color = alphaPB.BackColor;
|
||||||
if (colorDialog.ShowDialog() == DialogResult.OK)
|
if (colorDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
barSlider4.Value = colorDialog.Color.R / 255;
|
barSlider4.Value = colorDialog.Color.R / 255f;
|
||||||
|
|
||||||
|
ApplyValueSingles();
|
||||||
|
|
||||||
|
if (OnPanelChanged != null)
|
||||||
|
OnPanelChanged(activeParam, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user