GUI: hide volume macro on GB instruments
This commit is contained in:
parent
f376e919ff
commit
5ef34eb140
|
@ -910,6 +910,9 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
if (ins->type==DIV_INS_FM) {
|
if (ins->type==DIV_INS_FM) {
|
||||||
volMax=127;
|
volMax=127;
|
||||||
}
|
}
|
||||||
|
if (ins->type==DIV_INS_GB) {
|
||||||
|
volMax=0;
|
||||||
|
}
|
||||||
|
|
||||||
bool arpMode=ins->std.arpMacroMode;
|
bool arpMode=ins->std.arpMacroMode;
|
||||||
|
|
||||||
|
@ -962,7 +965,9 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
|
|
||||||
if (settings.macroView==0) { // modern view
|
if (settings.macroView==0) { // modern view
|
||||||
MACRO_BEGIN(28*dpiScale);
|
MACRO_BEGIN(28*dpiScale);
|
||||||
NORMAL_MACRO(ins->std.volMacro,ins->std.volMacroLen,ins->std.volMacroLoop,ins->std.volMacroRel,volMin,volMax,"vol",volumeLabel,160,ins->std.volMacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_VOLUME],mmlString[0],volMin,volMax,NULL);
|
if (volMax>0) {
|
||||||
|
NORMAL_MACRO(ins->std.volMacro,ins->std.volMacroLen,ins->std.volMacroLoop,ins->std.volMacroRel,volMin,volMax,"vol",volumeLabel,160,ins->std.volMacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_VOLUME],mmlString[0],volMin,volMax,NULL);
|
||||||
|
}
|
||||||
NORMAL_MACRO(ins->std.arpMacro,ins->std.arpMacroLen,ins->std.arpMacroLoop,ins->std.arpMacroRel,arpMacroScroll,arpMacroScroll+24,"arp","Arpeggio",160,ins->std.arpMacroOpen,false,NULL,true,&arpMacroScroll,(arpMode?0:-80),0,0,&ins->std.arpMacroMode,uiColors[GUI_COLOR_MACRO_PITCH],mmlString[1],-92,94,(ins->std.arpMacroMode?(¯oHoverNote):NULL));
|
NORMAL_MACRO(ins->std.arpMacro,ins->std.arpMacroLen,ins->std.arpMacroLoop,ins->std.arpMacroRel,arpMacroScroll,arpMacroScroll+24,"arp","Arpeggio",160,ins->std.arpMacroOpen,false,NULL,true,&arpMacroScroll,(arpMode?0:-80),0,0,&ins->std.arpMacroMode,uiColors[GUI_COLOR_MACRO_PITCH],mmlString[1],-92,94,(ins->std.arpMacroMode?(¯oHoverNote):NULL));
|
||||||
if (dutyMax>0) {
|
if (dutyMax>0) {
|
||||||
NORMAL_MACRO(ins->std.dutyMacro,ins->std.dutyMacroLen,ins->std.dutyMacroLoop,ins->std.dutyMacroRel,0,dutyMax,"duty",dutyLabel,160,ins->std.dutyMacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[2],0,dutyMax,NULL);
|
NORMAL_MACRO(ins->std.dutyMacro,ins->std.dutyMacroLen,ins->std.dutyMacroLoop,ins->std.dutyMacroRel,0,dutyMax,"duty",dutyLabel,160,ins->std.dutyMacroOpen,false,NULL,false,NULL,0,0,0,NULL,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[2],0,dutyMax,NULL);
|
||||||
|
@ -1020,35 +1025,37 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
loopIndicator[i]=(ins->std.volMacroLoop!=-1 && i>=ins->std.volMacroLoop);
|
loopIndicator[i]=(ins->std.volMacroLoop!=-1 && i>=ins->std.volMacroLoop);
|
||||||
}
|
}
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f));
|
|
||||||
macroDragScroll=0;
|
macroDragScroll=0;
|
||||||
ImGui::PlotHistogram("##IVolMacro",asFloat,ins->std.volMacroLen,0,NULL,volMin,volMax,ImVec2(400.0f*dpiScale,200.0f*dpiScale));
|
if (volMax>0) {
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f));
|
||||||
macroDragStart=ImGui::GetItemRectMin();
|
ImGui::PlotHistogram("##IVolMacro",asFloat,ins->std.volMacroLen,0,NULL,volMin,volMax,ImVec2(400.0f*dpiScale,200.0f*dpiScale));
|
||||||
macroDragAreaSize=ImVec2(400.0f*dpiScale,200.0f*dpiScale);
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||||
macroDragMin=volMin;
|
macroDragStart=ImGui::GetItemRectMin();
|
||||||
macroDragMax=volMax;
|
macroDragAreaSize=ImVec2(400.0f*dpiScale,200.0f*dpiScale);
|
||||||
macroDragLen=ins->std.volMacroLen;
|
macroDragMin=volMin;
|
||||||
macroDragActive=true;
|
macroDragMax=volMax;
|
||||||
macroDragTarget=ins->std.volMacro;
|
macroDragLen=ins->std.volMacroLen;
|
||||||
macroDragChar=false;
|
macroDragActive=true;
|
||||||
processDrags(ImGui::GetMousePos().x,ImGui::GetMousePos().y);
|
macroDragTarget=ins->std.volMacro;
|
||||||
}
|
macroDragChar=false;
|
||||||
ImGui::PlotHistogram("##IVolMacroLoop",loopIndicator,ins->std.volMacroLen,0,NULL,0,1,ImVec2(400.0f*dpiScale,16.0f*dpiScale));
|
processDrags(ImGui::GetMousePos().x,ImGui::GetMousePos().y);
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
}
|
||||||
macroLoopDragStart=ImGui::GetItemRectMin();
|
ImGui::PlotHistogram("##IVolMacroLoop",loopIndicator,ins->std.volMacroLen,0,NULL,0,1,ImVec2(400.0f*dpiScale,16.0f*dpiScale));
|
||||||
macroLoopDragAreaSize=ImVec2(400.0f*dpiScale,16.0f*dpiScale);
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||||
macroLoopDragLen=ins->std.volMacroLen;
|
macroLoopDragStart=ImGui::GetItemRectMin();
|
||||||
macroLoopDragTarget=&ins->std.volMacroLoop;
|
macroLoopDragAreaSize=ImVec2(400.0f*dpiScale,16.0f*dpiScale);
|
||||||
macroLoopDragActive=true;
|
macroLoopDragLen=ins->std.volMacroLen;
|
||||||
processDrags(ImGui::GetMousePos().x,ImGui::GetMousePos().y);
|
macroLoopDragTarget=&ins->std.volMacroLoop;
|
||||||
}
|
macroLoopDragActive=true;
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
processDrags(ImGui::GetMousePos().x,ImGui::GetMousePos().y);
|
||||||
ins->std.volMacroLoop=-1;
|
}
|
||||||
}
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||||
ImGui::PopStyleVar();
|
ins->std.volMacroLoop=-1;
|
||||||
if (ImGui::InputScalar("Length##IVolMacroL",ImGuiDataType_U8,&ins->std.volMacroLen,&_ONE,&_THREE)) {
|
}
|
||||||
if (ins->std.volMacroLen>127) ins->std.volMacroLen=127;
|
ImGui::PopStyleVar();
|
||||||
|
if (ImGui::InputScalar("Length##IVolMacroL",ImGuiDataType_U8,&ins->std.volMacroLen,&_ONE,&_THREE)) {
|
||||||
|
if (ins->std.volMacroLen>127) ins->std.volMacroLen=127;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// arp macro
|
// arp macro
|
||||||
|
|
Loading…
Reference in a new issue