mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: channel status, part 3
This commit is contained in:
parent
e28af73746
commit
20a5d9c089
5 changed files with 89 additions and 12 deletions
|
@ -388,7 +388,14 @@ struct DivChannelModeHints {
|
||||||
// - 1: volume
|
// - 1: volume
|
||||||
// - 2: pitch
|
// - 2: pitch
|
||||||
// - 3: panning
|
// - 3: panning
|
||||||
// - 4: ???
|
// - 4: chip primary
|
||||||
|
// - 5: chip secondary
|
||||||
|
// - 6: mixing
|
||||||
|
// - 7: DSP
|
||||||
|
// - 8: note
|
||||||
|
// - 9: misc 1
|
||||||
|
// - 10: misc 2
|
||||||
|
// - 11: misc 3
|
||||||
unsigned char type[4];
|
unsigned char type[4];
|
||||||
// up to 4
|
// up to 4
|
||||||
unsigned char count;
|
unsigned char count;
|
||||||
|
|
|
@ -310,6 +310,17 @@ enum FurnaceGUIColors {
|
||||||
GUI_COLOR_PATTERN_STATUS_REL,
|
GUI_COLOR_PATTERN_STATUS_REL,
|
||||||
GUI_COLOR_PATTERN_STATUS_REL_ON,
|
GUI_COLOR_PATTERN_STATUS_REL_ON,
|
||||||
GUI_COLOR_PATTERN_STATUS_ON,
|
GUI_COLOR_PATTERN_STATUS_ON,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_VOLUME,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_PITCH,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_PANNING,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_SYS1,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_SYS2,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_MIXING,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_DSP,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_NOTE,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_MISC1,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_MISC2,
|
||||||
|
GUI_COLOR_PATTERN_STATUS_MISC3,
|
||||||
|
|
||||||
GUI_COLOR_PATTERN_PAIR,
|
GUI_COLOR_PATTERN_PAIR,
|
||||||
|
|
||||||
|
|
|
@ -993,6 +993,17 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
|
||||||
D(GUI_COLOR_PATTERN_STATUS_REL,"",ImVec4(0.7f,0.1f,0.1f,1.0f)),
|
D(GUI_COLOR_PATTERN_STATUS_REL,"",ImVec4(0.7f,0.1f,0.1f,1.0f)),
|
||||||
D(GUI_COLOR_PATTERN_STATUS_REL_ON,"",ImVec4(1.0f,0.8f,0.1f,1.0f)),
|
D(GUI_COLOR_PATTERN_STATUS_REL_ON,"",ImVec4(1.0f,0.8f,0.1f,1.0f)),
|
||||||
D(GUI_COLOR_PATTERN_STATUS_ON,"",ImVec4(0.3f,1.0f,0.1f,1.0f)),
|
D(GUI_COLOR_PATTERN_STATUS_ON,"",ImVec4(0.3f,1.0f,0.1f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_VOLUME,"",ImVec4(0.0f,1.0f,0.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_PITCH,"",ImVec4(1.0f,1.0f,0.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_PANNING,"",ImVec4(0.0f,1.0f,1.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_SYS1,"",ImVec4(0.5f,1.0f,0.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_SYS2,"",ImVec4(0.0f,1.0f,0.5f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_MIXING,"",ImVec4(1.0f,0.3f,1.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_DSP,"",ImVec4(0.3f,0.6f,1.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_NOTE,"",ImVec4(0.3f,0.3f,1.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_MISC1,"",ImVec4(1.0f,0.5f,0.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_MISC2,"",ImVec4(0.7f,0.5f,1.0f,1.0f)),
|
||||||
|
D(GUI_COLOR_PATTERN_STATUS_MISC3,"",ImVec4(1.0f,0.1f,0.1f,1.0f)),
|
||||||
|
|
||||||
D(GUI_COLOR_PATTERN_PAIR,"",ImVec4(0.6f,0.8f,1.0f,1.0f)),
|
D(GUI_COLOR_PATTERN_PAIR,"",ImVec4(0.6f,0.8f,1.0f,1.0f)),
|
||||||
|
|
||||||
|
|
|
@ -969,22 +969,22 @@ void FurnaceGUI::drawPattern() {
|
||||||
const char* pitchIcon=ICON_FUR_SINE;
|
const char* pitchIcon=ICON_FUR_SINE;
|
||||||
if (cs->inPorta) {
|
if (cs->inPorta) {
|
||||||
pitchIcon=ICON_FA_SHARE;
|
pitchIcon=ICON_FA_SHARE;
|
||||||
pitchColor=uiColors[GUI_COLOR_PATTERN_EFFECT_PITCH];
|
pitchColor=uiColors[GUI_COLOR_PATTERN_STATUS_PITCH];
|
||||||
} else if (cs->portaSpeed>0) {
|
} else if (cs->portaSpeed>0) {
|
||||||
if (cs->portaNote>=60) {
|
if (cs->portaNote>=60) {
|
||||||
pitchIcon=ICON_FA_CHEVRON_UP;
|
pitchIcon=ICON_FA_CHEVRON_UP;
|
||||||
} else {
|
} else {
|
||||||
pitchIcon=ICON_FA_CHEVRON_DOWN;
|
pitchIcon=ICON_FA_CHEVRON_DOWN;
|
||||||
}
|
}
|
||||||
pitchColor=uiColors[GUI_COLOR_PATTERN_EFFECT_PITCH];
|
pitchColor=uiColors[GUI_COLOR_PATTERN_STATUS_PITCH];
|
||||||
} else if (cs->vibratoDepth>0) {
|
} else if (cs->vibratoDepth>0) {
|
||||||
pitchIcon=ICON_FUR_SINE;
|
pitchIcon=ICON_FUR_SINE;
|
||||||
pitchColor=uiColors[GUI_COLOR_PATTERN_EFFECT_PITCH];
|
pitchColor=uiColors[GUI_COLOR_PATTERN_STATUS_PITCH];
|
||||||
} else if (cs->arp) {
|
} else if (cs->arp) {
|
||||||
pitchIcon=ICON_FA_BARS;
|
pitchIcon=ICON_FA_BARS;
|
||||||
pitchColor=uiColors[GUI_COLOR_PATTERN_EFFECT_MISC];
|
pitchColor=uiColors[GUI_COLOR_PATTERN_STATUS_NOTE];
|
||||||
} else {
|
} else {
|
||||||
pitchColor=uiColors[GUI_COLOR_TOGGLE_OFF];
|
pitchColor=uiColors[GUI_COLOR_PATTERN_STATUS_OFF];
|
||||||
}
|
}
|
||||||
iconPos[1].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,pitchIcon).x*0.5f;
|
iconPos[1].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,pitchIcon).x*0.5f;
|
||||||
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[1],ImGui::GetColorU32(pitchColor),pitchIcon);
|
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[1],ImGui::GetColorU32(pitchColor),pitchIcon);
|
||||||
|
@ -995,16 +995,16 @@ void FurnaceGUI::drawPattern() {
|
||||||
const char* volIcon=ICON_FA_MINUS;
|
const char* volIcon=ICON_FA_MINUS;
|
||||||
if (cs->tremoloDepth>0) {
|
if (cs->tremoloDepth>0) {
|
||||||
volIcon=ICON_FUR_SINE;
|
volIcon=ICON_FUR_SINE;
|
||||||
volColor=uiColors[GUI_COLOR_PATTERN_VOLUME_MAX];
|
volColor=uiColors[GUI_COLOR_PATTERN_STATUS_VOLUME];
|
||||||
} else if (cs->volSpeed) {
|
} else if (cs->volSpeed) {
|
||||||
if (cs->volSpeed>0) {
|
if (cs->volSpeed>0) {
|
||||||
volIcon=ICON_FA_CHEVRON_UP;
|
volIcon=ICON_FA_CHEVRON_UP;
|
||||||
} else {
|
} else {
|
||||||
volIcon=ICON_FA_CHEVRON_DOWN;
|
volIcon=ICON_FA_CHEVRON_DOWN;
|
||||||
}
|
}
|
||||||
volColor=uiColors[GUI_COLOR_PATTERN_VOLUME_MAX];
|
volColor=uiColors[GUI_COLOR_PATTERN_STATUS_VOLUME];
|
||||||
} else {
|
} else {
|
||||||
volColor=uiColors[GUI_COLOR_TOGGLE_OFF];
|
volColor=uiColors[GUI_COLOR_PATTERN_STATUS_OFF];
|
||||||
}
|
}
|
||||||
iconPos[2].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,volIcon).x*0.5f;
|
iconPos[2].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,volIcon).x*0.5f;
|
||||||
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[2],ImGui::GetColorU32(volColor),volIcon);
|
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[2],ImGui::GetColorU32(volColor),volIcon);
|
||||||
|
@ -1012,8 +1012,45 @@ void FurnaceGUI::drawPattern() {
|
||||||
// 4. OTHER
|
// 4. OTHER
|
||||||
for (int i=0; i<hints.count; i++) {
|
for (int i=0; i<hints.count; i++) {
|
||||||
if (hints.hint[i]==NULL) continue;
|
if (hints.hint[i]==NULL) continue;
|
||||||
ImVec4 hintColor=uiColors[GUI_COLOR_TOGGLE_OFF];
|
ImVec4 hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_OFF];
|
||||||
// TODO: color
|
switch (hints.type[i]) {
|
||||||
|
case 0:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_OFF];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_VOLUME];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_PITCH];
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_PANNING];
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_SYS1];
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_SYS2];
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MIXING];
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_DSP];
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MISC1];
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MISC2];
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MISC3];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
hintColor=uiColors[GUI_COLOR_TEXT];
|
||||||
|
break;
|
||||||
|
}
|
||||||
iconPos[i+3].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,hints.hint[i]).x*0.5f;
|
iconPos[i+3].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,hints.hint[i]).x*0.5f;
|
||||||
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[i+3],ImGui::GetColorU32(hintColor),hints.hint[i]);
|
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[i+3],ImGui::GetColorU32(hintColor),hints.hint[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3366,10 +3366,21 @@ void FurnaceGUI::drawSettings() {
|
||||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_EFFECT_SYS_SECONDARY,"Secondary specific effect");
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_EFFECT_SYS_SECONDARY,"Secondary specific effect");
|
||||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_EFFECT_MISC,"Miscellaneous");
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_EFFECT_MISC,"Miscellaneous");
|
||||||
UI_COLOR_CONFIG(GUI_COLOR_EE_VALUE,"External command output");
|
UI_COLOR_CONFIG(GUI_COLOR_EE_VALUE,"External command output");
|
||||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_OFF,"Status: off");
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_OFF,"Status: off/disabled");
|
||||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_REL,"Status: off + macro rel");
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_REL,"Status: off + macro rel");
|
||||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_REL_ON,"Status: on + macro rel");
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_REL_ON,"Status: on + macro rel");
|
||||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_ON,"Status: on");
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_ON,"Status: on");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_VOLUME,"Status: volume");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_PITCH,"Status: pitch");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_PANNING,"Status: panning");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_SYS1,"Status: chip (primary)");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_SYS2,"Status: chip (secondary)");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_MIXING,"Status: mixing");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_DSP,"Status: DSP effect");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_NOTE,"Status: note altering");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_MISC1,"Status: misc color 1");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_MISC2,"Status: misc color 2");
|
||||||
|
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_MISC3,"Status: misc color 3");
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
if (ImGui::TreeNode("Sample Editor")) {
|
if (ImGui::TreeNode("Sample Editor")) {
|
||||||
|
|
Loading…
Reference in a new issue