mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
GUI: and now for backspace too
This commit is contained in:
parent
02f6a0f217
commit
accec6d865
3 changed files with 24 additions and 6 deletions
|
@ -245,14 +245,22 @@ void FurnaceGUI::doPullDelete() {
|
|||
updateScroll(cursor.y);
|
||||
}
|
||||
|
||||
int iCoarse=selStart.xCoarse;
|
||||
int iFine=selStart.xFine;
|
||||
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
|
||||
SelectionPoint sStart=selStart;
|
||||
SelectionPoint sEnd=selEnd;
|
||||
|
||||
if (selStart.xCoarse==selEnd.xCoarse && selStart.xFine==selEnd.xFine && selStart.y==selEnd.y && settings.pullDeleteRow) {
|
||||
sStart.xFine=0;
|
||||
sEnd.xFine=2+e->curPat[sEnd.xCoarse].effectCols*2;
|
||||
}
|
||||
|
||||
int iCoarse=sStart.xCoarse;
|
||||
int iFine=sStart.xFine;
|
||||
for (; iCoarse<=sEnd.xCoarse; iCoarse++) {
|
||||
if (!e->curSubSong->chanShow[iCoarse]) continue;
|
||||
DivPattern* pat=e->curPat[iCoarse].getPattern(e->curOrders->ord[iCoarse][curOrder],true);
|
||||
for (; iFine<3+e->curPat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
|
||||
for (; iFine<3+e->curPat[iCoarse].effectCols*2 && (iCoarse<sEnd.xCoarse || iFine<=sEnd.xFine); iFine++) {
|
||||
maskOut(opMaskPullDelete,iFine);
|
||||
for (int j=selStart.y; j<e->curSubSong->patLen; j++) {
|
||||
for (int j=sStart.y; j<e->curSubSong->patLen; j++) {
|
||||
if (j<e->curSubSong->patLen-1) {
|
||||
if (iFine==0) {
|
||||
pat->data[j][iFine]=pat->data[j+1][iFine];
|
||||
|
@ -280,7 +288,7 @@ void FurnaceGUI::doInsert() {
|
|||
SelectionPoint sStart=selStart;
|
||||
SelectionPoint sEnd=selEnd;
|
||||
|
||||
if (selStart.xCoarse==selEnd.xCoarse && selStart.xFine==selEnd.xFine && selStart.y==selEnd.y) {
|
||||
if (selStart.xCoarse==selEnd.xCoarse && selStart.xFine==selEnd.xFine && selStart.y==selEnd.y && settings.insertBehavior) {
|
||||
sStart.xFine=0;
|
||||
sEnd.xFine=2+e->curPat[sEnd.xCoarse].effectCols*2;
|
||||
}
|
||||
|
|
|
@ -1497,6 +1497,7 @@ class FurnaceGUI {
|
|||
int newPatternFormat;
|
||||
int renderClearPos;
|
||||
int insertBehavior;
|
||||
int pullDeleteRow;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -1647,6 +1648,7 @@ class FurnaceGUI {
|
|||
newPatternFormat(1),
|
||||
renderClearPos(0),
|
||||
insertBehavior(1),
|
||||
pullDeleteRow(1),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -548,6 +548,11 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.insertBehavior=insertBehaviorB;
|
||||
}
|
||||
|
||||
bool pullDeleteRowB=settings.pullDeleteRow;
|
||||
if (ImGui::Checkbox("Pull delete affects entire channel row",&pullDeleteRowB)) {
|
||||
settings.pullDeleteRow=pullDeleteRowB;
|
||||
}
|
||||
|
||||
bool absorbInsInputB=settings.absorbInsInput;
|
||||
if (ImGui::Checkbox("Change current instrument when changing instrument column (absorb)",&absorbInsInputB)) {
|
||||
settings.absorbInsInput=absorbInsInputB;
|
||||
|
@ -2743,6 +2748,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.renderBackend=e->getConfString("renderBackend","SDL");
|
||||
settings.renderClearPos=e->getConfInt("renderClearPos",0);
|
||||
settings.insertBehavior=e->getConfInt("insertBehavior",1);
|
||||
settings.pullDeleteRow=e->getConfInt("pullDeleteRow",1);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
@ -2867,6 +2873,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.newPatternFormat,0,1);
|
||||
clampSetting(settings.renderClearPos,0,1);
|
||||
clampSetting(settings.insertBehavior,0,1);
|
||||
clampSetting(settings.pullDeleteRow,0,1);
|
||||
|
||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
@ -3087,6 +3094,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("renderBackend",settings.renderBackend);
|
||||
e->setConf("renderClearPos",settings.renderClearPos);
|
||||
e->setConf("insertBehavior",settings.insertBehavior);
|
||||
e->setConf("pullDeleteRow",settings.pullDeleteRow);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
Loading…
Reference in a new issue