1
0
mirror of synced 2024-12-02 02:57:23 +01:00

Fix color dialogs not working for params

This commit is contained in:
KillzXGaming 2019-04-13 12:22:56 -04:00
parent 1487422c38
commit 72f1feb51f
12 changed files with 22 additions and 14 deletions

Binary file not shown.

View File

@ -132,16 +132,14 @@ namespace FirstPlugin.Forms
colorDialog.Color = pictureBox1.BackColor;
if (colorDialog.ShowDialog() == DialogResult.OK)
{
activeParam.ValueFloat = new float[]
{
colorDialog.Color.R / 255,
colorDialog.Color.G / 255,
colorDialog.Color.B / 255,
};
barSlider1.Value = colorDialog.Color.R / 255;
barSlider2.Value = colorDialog.Color.G / 255;
barSlider3.Value = colorDialog.Color.B / 255;
SetColor(activeParam.Name, activeParam.ValueFloat);
barSlider1.Value = colorDialog.Color.R / 255f;
barSlider2.Value = colorDialog.Color.G / 255f;
barSlider3.Value = colorDialog.Color.B / 255f;
ApplyValueSingles();
if (OnPanelChanged != null)
OnPanelChanged(activeParam, this);
}
}
}

View File

@ -192,9 +192,14 @@ namespace FirstPlugin.Forms
colorDialog.Color = colorPB.BackColor;
if (colorDialog.ShowDialog() == DialogResult.OK)
{
barSlider1.Value = colorDialog.Color.R / 255;
barSlider2.Value = colorDialog.Color.G / 255;
barSlider3.Value = colorDialog.Color.B / 255;
barSlider1.Value = colorDialog.Color.R / 255f;
barSlider2.Value = colorDialog.Color.G / 255f;
barSlider3.Value = colorDialog.Color.B / 255f;
ApplyValueSingles();
if (OnPanelChanged != null)
OnPanelChanged(activeParam, this);
}
}
@ -204,7 +209,12 @@ namespace FirstPlugin.Forms
colorDialog.Color = alphaPB.BackColor;
if (colorDialog.ShowDialog() == DialogResult.OK)
{
barSlider4.Value = colorDialog.Color.R / 255;
barSlider4.Value = colorDialog.Color.R / 255f;
ApplyValueSingles();
if (OnPanelChanged != null)
OnPanelChanged(activeParam, this);
}
}