chan color on chanosc channels
todo: gradient. storing a gradient per channel would be absurd. my idea is when the bg is set to chan color, make the gradient bg transparent, then mix the grad with the color in get()
This commit is contained in:
parent
fa0e5494ad
commit
c681ac507e
3 changed files with 8 additions and 2 deletions
|
|
@ -360,7 +360,10 @@ void FurnaceGUI::drawChanOsc() {
|
|||
}
|
||||
} else {
|
||||
ImGui::SetNextItemWidth(400.0f*dpiScale);
|
||||
ImGui::BeginDisabled(chanOscUseChanColor);
|
||||
ImGui::ColorPicker4(_("Color"),(float*)&chanOscColor);
|
||||
ImGui::EndDisabled();
|
||||
ImGui::Checkbox(_("Set to channel color"), &chanOscUseChanColor);
|
||||
}
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
|
|
@ -793,7 +796,7 @@ void FurnaceGUI::drawChanOsc() {
|
|||
}
|
||||
}
|
||||
}
|
||||
ImU32 color=ImGui::GetColorU32(chanOscColor);
|
||||
ImU32 color=ImGui::GetColorU32(chanOscUseChanColor?channelColor(oscChans[i]):chanOscColor);
|
||||
if (chanOscUseGrad) {
|
||||
float xVal=computeGradPos(chanOscColorX,ch);
|
||||
float yVal=computeGradPos(chanOscColorY,ch);
|
||||
|
|
|
|||
|
|
@ -8402,6 +8402,7 @@ void FurnaceGUI::syncState() {
|
|||
chanOscTextColor.z=e->getConfFloat("chanOscTextColorB",1.0f);
|
||||
chanOscTextColor.w=e->getConfFloat("chanOscTextColorA",0.75f);
|
||||
chanOscUseGrad=e->getConfBool("chanOscUseGrad",false);
|
||||
chanOscUseChanColor=e->getConfBool("chanOscUseChanColor", false);
|
||||
chanOscGrad.fromString(e->getConfString("chanOscGrad",""));
|
||||
chanOscGrad.render();
|
||||
|
||||
|
|
@ -8576,6 +8577,7 @@ void FurnaceGUI::commitState(DivConfig& conf) {
|
|||
conf.set("chanOscTextColorA",chanOscTextColor.w);
|
||||
conf.set("chanOscUseGrad",chanOscUseGrad);
|
||||
conf.set("chanOscGrad",chanOscGrad.toString());
|
||||
conf.set("chanOscUseChanColor",chanOscUseChanColor);
|
||||
|
||||
// commit x-y osc state
|
||||
conf.set("xyOscXChannel",xyOscXChannel);
|
||||
|
|
@ -9200,6 +9202,7 @@ FurnaceGUI::FurnaceGUI():
|
|||
chanOscUseGrad(false),
|
||||
chanOscNormalize(false),
|
||||
chanOscRandomPhase(false),
|
||||
chanOscUseChanColor(false),
|
||||
chanOscTextFormat("%c"),
|
||||
chanOscColor(1.0f,1.0f,1.0f,1.0f),
|
||||
chanOscTextColor(1.0f,1.0f,1.0f,0.75f),
|
||||
|
|
|
|||
|
|
@ -2698,7 +2698,7 @@ class FurnaceGUI {
|
|||
// per-channel oscilloscope
|
||||
int chanOscCols, chanOscAutoColsType, chanOscColorX, chanOscColorY, chanOscCenterStrat;
|
||||
float chanOscWindowSize, chanOscTextX, chanOscTextY, chanOscAmplify, chanOscLineSize;
|
||||
bool chanOscWaveCorr, chanOscOptions, updateChanOscGradTex, chanOscUseGrad, chanOscNormalize, chanOscRandomPhase;
|
||||
bool chanOscWaveCorr, chanOscOptions, updateChanOscGradTex, chanOscUseGrad, chanOscNormalize, chanOscRandomPhase, chanOscUseChanColor;
|
||||
String chanOscTextFormat;
|
||||
ImVec4 chanOscColor, chanOscTextColor;
|
||||
Gradient2D chanOscGrad;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue