GUI: add "absorb" instrument input mode

This commit is contained in:
tildearrow 2022-04-21 02:35:50 -05:00
parent 4195715dc0
commit 06a69a20e8
3 changed files with 13 additions and 0 deletions

View File

@ -954,6 +954,9 @@ void FurnaceGUI::valueInput(int num, bool direct, int target) {
pat->data[cursor.y][target]=(int)e->song.ins.size()-1;
}
}
if (settings.absorbInsInput) {
curIns=pat->data[cursor.y][target];
}
makeUndo(GUI_UNDO_PATTERN_EDIT);
if (direct) {
curNibble=false;

View File

@ -826,6 +826,7 @@ class FurnaceGUI {
int lowLatency;
int notePreviewBehavior;
int powerSave;
int absorbInsInput;
unsigned int maxUndoSteps;
String mainFontPath;
String patFontPath;
@ -900,6 +901,7 @@ class FurnaceGUI {
lowLatency(0),
notePreviewBehavior(1),
powerSave(1),
absorbInsInput(0),
maxUndoSteps(100),
mainFontPath(""),
patFontPath(""),

View File

@ -258,6 +258,11 @@ void FurnaceGUI::drawSettings() {
settings.stepOnDelete=stepOnDeleteB;
}
bool absorbInsInputB=settings.absorbInsInput;
if (ImGui::Checkbox("Change current instrument when changing instrument column (absorb)",&absorbInsInputB)) {
settings.absorbInsInput=absorbInsInputB;
}
bool effectDeletionAltersValueB=settings.effectDeletionAltersValue;
if (ImGui::Checkbox("Delete effect value when deleting effect",&effectDeletionAltersValueB)) {
settings.effectDeletionAltersValue=effectDeletionAltersValueB;
@ -1645,6 +1650,7 @@ void FurnaceGUI::syncSettings() {
settings.lowLatency=e->getConfInt("lowLatency",0);
settings.notePreviewBehavior=e->getConfInt("notePreviewBehavior",1);
settings.powerSave=e->getConfInt("powerSave",POWER_SAVE_DEFAULT);
settings.absorbInsInput=e->getConfInt("absorbInsInput",0);
clampSetting(settings.mainFontSize,2,96);
clampSetting(settings.patFontSize,2,96);
@ -1708,6 +1714,7 @@ void FurnaceGUI::syncSettings() {
clampSetting(settings.lowLatency,0,1);
clampSetting(settings.notePreviewBehavior,0,3);
clampSetting(settings.powerSave,0,1);
clampSetting(settings.absorbInsInput,0,1);
// keybinds
for (int i=0; i<GUI_ACTION_MAX; i++) {
@ -1798,6 +1805,7 @@ void FurnaceGUI::commitSettings() {
e->setConf("lowLatency",settings.lowLatency);
e->setConf("notePreviewBehavior",settings.notePreviewBehavior);
e->setConf("powerSave",settings.powerSave);
e->setConf("absorbInsInput",settings.absorbInsInput);
// colors
for (int i=0; i<GUI_COLOR_MAX; i++) {