Merge branch 'chanColorsEtc' into inf2

This commit is contained in:
tildearrow 2025-11-21 10:51:44 -05:00
commit fea3bab550
11 changed files with 207 additions and 92 deletions

View file

@ -942,7 +942,7 @@ ImVec4 FurnaceGUI::channelColor(int ch) {
return uiColors[GUI_COLOR_CHANNEL_BG];
break;
case 1:
return uiColors[GUI_COLOR_CHANNEL_FM+e->getChannelType(ch)];
return e->curSubSong->chanColor[ch]?ImGui::ColorConvertU32ToFloat4(e->curSubSong->chanColor[ch]):uiColors[GUI_COLOR_CHANNEL_FM+e->getChannelType(ch)];
break;
case 2:
return uiColors[GUI_COLOR_INSTR_STD+e->getPreferInsType(ch)];
@ -8377,7 +8377,7 @@ void FurnaceGUI::syncState() {
pianoLabelsMode=e->getConfInt("pianoLabelsMode",pianoLabelsMode);
chanOscCols=e->getConfInt("chanOscCols",3);
chanOscAutoColsType=e->getConfInt("chanOscAutoColsType",0);
chanOscAutoCols=e->getConfBool("chanOscAutoColsType",0);
chanOscColorX=e->getConfInt("chanOscColorX",GUI_OSCREF_CENTER);
chanOscColorY=e->getConfInt("chanOscColorY",GUI_OSCREF_CENTER);
chanOscCenterStrat=e->getConfInt("chanOscCenterStrat",1);
@ -8400,6 +8400,7 @@ void FurnaceGUI::syncState() {
chanOscTextColor.z=e->getConfFloat("chanOscTextColorB",1.0f);
chanOscTextColor.w=e->getConfFloat("chanOscTextColorA",0.75f);
chanOscUseGrad=e->getConfBool("chanOscUseGrad",false);
chanOscColorMode=e->getConfInt("chanOscColorMode",0);
chanOscGrad.fromString(e->getConfString("chanOscGrad",""));
chanOscGrad.render();
@ -8550,7 +8551,7 @@ void FurnaceGUI::commitState(DivConfig& conf) {
// commit per-chan osc state
conf.set("chanOscCols",chanOscCols);
conf.set("chanOscAutoColsType",chanOscAutoColsType);
conf.set("chanOscAutoColsType",chanOscAutoCols);
conf.set("chanOscColorX",chanOscColorX);
conf.set("chanOscColorY",chanOscColorY);
conf.set("chanOscCenterStrat",chanOscCenterStrat);
@ -8574,6 +8575,7 @@ void FurnaceGUI::commitState(DivConfig& conf) {
conf.set("chanOscTextColorA",chanOscTextColor.w);
conf.set("chanOscUseGrad",chanOscUseGrad);
conf.set("chanOscGrad",chanOscGrad.toString());
conf.set("chanOscColorMode",chanOscColorMode);
// commit x-y osc state
conf.set("xyOscXChannel",xyOscXChannel);
@ -9183,10 +9185,10 @@ FurnaceGUI::FurnaceGUI():
oscInput1(0.0f),
oscZoomSlider(false),
chanOscCols(3),
chanOscAutoColsType(0),
chanOscColorX(GUI_OSCREF_CENTER),
chanOscColorY(GUI_OSCREF_CENTER),
chanOscCenterStrat(1),
chanOscColorMode(0),
chanOscWindowSize(20.0f),
chanOscTextX(0.0f),
chanOscTextY(0.0f),
@ -9198,6 +9200,7 @@ FurnaceGUI::FurnaceGUI():
chanOscUseGrad(false),
chanOscNormalize(false),
chanOscRandomPhase(false),
chanOscAutoCols(false),
chanOscTextFormat("%c"),
chanOscColor(1.0f,1.0f,1.0f,1.0f),
chanOscTextColor(1.0f,1.0f,1.0f,0.75f),
@ -9380,7 +9383,7 @@ FurnaceGUI::FurnaceGUI():
memset(lastAudioLoads,0,sizeof(float)*120);
memset(pianoKeyHit,0,sizeof(float)*180);
memset(pianoKeyHit,0,sizeof(pianoKeyState)*180); // posiblly repace with a for loop
memset(pianoKeyPressed,0,sizeof(bool)*180);
memset(queryReplaceEffectMode,0,sizeof(int)*8);