mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: add "absorb" instrument input mode
This commit is contained in:
parent
4195715dc0
commit
06a69a20e8
3 changed files with 13 additions and 0 deletions
|
@ -954,6 +954,9 @@ void FurnaceGUI::valueInput(int num, bool direct, int target) {
|
||||||
pat->data[cursor.y][target]=(int)e->song.ins.size()-1;
|
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);
|
makeUndo(GUI_UNDO_PATTERN_EDIT);
|
||||||
if (direct) {
|
if (direct) {
|
||||||
curNibble=false;
|
curNibble=false;
|
||||||
|
|
|
@ -826,6 +826,7 @@ class FurnaceGUI {
|
||||||
int lowLatency;
|
int lowLatency;
|
||||||
int notePreviewBehavior;
|
int notePreviewBehavior;
|
||||||
int powerSave;
|
int powerSave;
|
||||||
|
int absorbInsInput;
|
||||||
unsigned int maxUndoSteps;
|
unsigned int maxUndoSteps;
|
||||||
String mainFontPath;
|
String mainFontPath;
|
||||||
String patFontPath;
|
String patFontPath;
|
||||||
|
@ -900,6 +901,7 @@ class FurnaceGUI {
|
||||||
lowLatency(0),
|
lowLatency(0),
|
||||||
notePreviewBehavior(1),
|
notePreviewBehavior(1),
|
||||||
powerSave(1),
|
powerSave(1),
|
||||||
|
absorbInsInput(0),
|
||||||
maxUndoSteps(100),
|
maxUndoSteps(100),
|
||||||
mainFontPath(""),
|
mainFontPath(""),
|
||||||
patFontPath(""),
|
patFontPath(""),
|
||||||
|
|
|
@ -258,6 +258,11 @@ void FurnaceGUI::drawSettings() {
|
||||||
settings.stepOnDelete=stepOnDeleteB;
|
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;
|
bool effectDeletionAltersValueB=settings.effectDeletionAltersValue;
|
||||||
if (ImGui::Checkbox("Delete effect value when deleting effect",&effectDeletionAltersValueB)) {
|
if (ImGui::Checkbox("Delete effect value when deleting effect",&effectDeletionAltersValueB)) {
|
||||||
settings.effectDeletionAltersValue=effectDeletionAltersValueB;
|
settings.effectDeletionAltersValue=effectDeletionAltersValueB;
|
||||||
|
@ -1645,6 +1650,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
settings.lowLatency=e->getConfInt("lowLatency",0);
|
settings.lowLatency=e->getConfInt("lowLatency",0);
|
||||||
settings.notePreviewBehavior=e->getConfInt("notePreviewBehavior",1);
|
settings.notePreviewBehavior=e->getConfInt("notePreviewBehavior",1);
|
||||||
settings.powerSave=e->getConfInt("powerSave",POWER_SAVE_DEFAULT);
|
settings.powerSave=e->getConfInt("powerSave",POWER_SAVE_DEFAULT);
|
||||||
|
settings.absorbInsInput=e->getConfInt("absorbInsInput",0);
|
||||||
|
|
||||||
clampSetting(settings.mainFontSize,2,96);
|
clampSetting(settings.mainFontSize,2,96);
|
||||||
clampSetting(settings.patFontSize,2,96);
|
clampSetting(settings.patFontSize,2,96);
|
||||||
|
@ -1708,6 +1714,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
clampSetting(settings.lowLatency,0,1);
|
clampSetting(settings.lowLatency,0,1);
|
||||||
clampSetting(settings.notePreviewBehavior,0,3);
|
clampSetting(settings.notePreviewBehavior,0,3);
|
||||||
clampSetting(settings.powerSave,0,1);
|
clampSetting(settings.powerSave,0,1);
|
||||||
|
clampSetting(settings.absorbInsInput,0,1);
|
||||||
|
|
||||||
// keybinds
|
// keybinds
|
||||||
for (int i=0; i<GUI_ACTION_MAX; i++) {
|
for (int i=0; i<GUI_ACTION_MAX; i++) {
|
||||||
|
@ -1798,6 +1805,7 @@ void FurnaceGUI::commitSettings() {
|
||||||
e->setConf("lowLatency",settings.lowLatency);
|
e->setConf("lowLatency",settings.lowLatency);
|
||||||
e->setConf("notePreviewBehavior",settings.notePreviewBehavior);
|
e->setConf("notePreviewBehavior",settings.notePreviewBehavior);
|
||||||
e->setConf("powerSave",settings.powerSave);
|
e->setConf("powerSave",settings.powerSave);
|
||||||
|
e->setConf("absorbInsInput",settings.absorbInsInput);
|
||||||
|
|
||||||
// colors
|
// colors
|
||||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||||
|
|
Loading…
Reference in a new issue