diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 9787a4da6..fec3b6ed7 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -967,7 +967,11 @@ void FurnaceGUI::valueInput(int num, bool direct, int target) { pat->data[cursor.y][target]=num&0xff; } else { if (pat->data[cursor.y][target]==-1) pat->data[cursor.y][target]=0; - pat->data[cursor.y][target]=((pat->data[cursor.y][target]<<4)|num)&0xff; + if (!settings.pushNibble && !curNibble) { + pat->data[cursor.y][target]=num; + } else { + pat->data[cursor.y][target]=((pat->data[cursor.y][target]<<4)|num)&0xff; + } } if (cursor.xFine==1) { // instrument if (pat->data[cursor.y][target]>=(int)e->song.ins.size()) { diff --git a/src/gui/gui.h b/src/gui/gui.h index 4b9ca05ad..d9a15162d 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -811,6 +811,7 @@ class FurnaceGUI { int separateFMColors; int insEditColorize; int metroVol; + int pushNibble; unsigned int maxUndoSteps; String mainFontPath; String patFontPath; @@ -878,6 +879,7 @@ class FurnaceGUI { separateFMColors(0), insEditColorize(0), metroVol(100), + pushNibble(0), maxUndoSteps(100), mainFontPath(""), patFontPath(""), diff --git a/src/gui/guiConst.cpp b/src/gui/guiConst.cpp index 481ce6f20..10b004421 100644 --- a/src/gui/guiConst.cpp +++ b/src/gui/guiConst.cpp @@ -454,8 +454,8 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={ D(GUI_COLOR_CHANNEL_FM,"",ImVec4(0.2f,0.8f,1.0f,1.0f)), D(GUI_COLOR_CHANNEL_PULSE,"",ImVec4(0.4f,1.0f,0.2f,1.0f)), D(GUI_COLOR_CHANNEL_NOISE,"",ImVec4(0.8f,0.8f,0.8f,1.0f)), - D(GUI_COLOR_CHANNEL_WAVE,"",ImVec4(1.0f,0.9f,0.2f,1.0f)), - D(GUI_COLOR_CHANNEL_PCM,"",ImVec4(1.0f,0.5f,0.2f,1.0f)), + D(GUI_COLOR_CHANNEL_WAVE,"",ImVec4(1.0f,0.5f,0.2f,1.0f)), + D(GUI_COLOR_CHANNEL_PCM,"",ImVec4(1.0f,0.9f,0.2f,1.0f)), D(GUI_COLOR_CHANNEL_OP,"",ImVec4(0.2f,0.4f,1.0f,1.0f)), D(GUI_COLOR_CHANNEL_MUTED,"",ImVec4(0.5f,0.5f,0.5f,1.0f)), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 7dc6478e0..8804a6125 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -236,6 +236,11 @@ void FurnaceGUI::drawSettings() { settings.soloAction=2; } + bool pushNibbleB=settings.pushNibble; + if (ImGui::Checkbox("Push value when overwriting instead of clearing it",&pushNibbleB)) { + settings.pushNibble=pushNibbleB; + } + bool pullDeleteBehaviorB=settings.pullDeleteBehavior; if (ImGui::Checkbox("Move cursor up on backspace-delete",&pullDeleteBehaviorB)) { settings.pullDeleteBehavior=pullDeleteBehaviorB; @@ -1568,6 +1573,7 @@ void FurnaceGUI::syncSettings() { settings.separateFMColors=e->getConfInt("separateFMColors",0); settings.insEditColorize=e->getConfInt("insEditColorize",0); settings.metroVol=e->getConfInt("metroVol",100); + settings.pushNibble=e->getConfInt("pushNibble",0); clampSetting(settings.mainFontSize,2,96); clampSetting(settings.patFontSize,2,96); @@ -1624,6 +1630,7 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.separateFMColors,0,1); clampSetting(settings.insEditColorize,0,1); clampSetting(settings.metroVol,0,200); + clampSetting(settings.pushNibble,0,1); // keybinds for (int i=0; isetConf("separateFMColors",settings.separateFMColors); e->setConf("insEditColorize",settings.insEditColorize); e->setConf("metroVol",settings.metroVol); + e->setConf("pushNibble",settings.pushNibble); // colors for (int i=0; i