mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
GUI: double click selects column
This commit is contained in:
parent
4abfd4f097
commit
bc98673a20
4 changed files with 26 additions and 3 deletions
1
TODO.md
1
TODO.md
|
@ -11,7 +11,6 @@
|
||||||
- volume commands should work on Game Boy
|
- volume commands should work on Game Boy
|
||||||
- add another FM editor layout
|
- add another FM editor layout
|
||||||
- if macros have release, note off should release them
|
- if macros have release, note off should release them
|
||||||
- add ability to select a column by double clicking
|
|
||||||
- add ability to move selection by dragging
|
- add ability to move selection by dragging
|
||||||
- Apply button in settings
|
- Apply button in settings
|
||||||
- find and replace
|
- find and replace
|
||||||
|
|
|
@ -27,6 +27,21 @@ void FurnaceGUI::startSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
||||||
if (xCoarse!=selStart.xCoarse || xFine!=selStart.xFine || y!=selStart.y) {
|
if (xCoarse!=selStart.xCoarse || xFine!=selStart.xFine || y!=selStart.y) {
|
||||||
curNibble=false;
|
curNibble=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left) && !fullRow && settings.doubleClickColumn) {
|
||||||
|
if (cursor.xCoarse==xCoarse && cursor.xFine==xFine && cursor.y==y) {
|
||||||
|
// select entire channel
|
||||||
|
selStart.xCoarse=xCoarse;
|
||||||
|
selStart.xFine=0;
|
||||||
|
selStart.y=0;
|
||||||
|
selEnd.xCoarse=xCoarse;
|
||||||
|
selEnd.xFine=2+e->curPat[selEnd.xCoarse].effectCols*2;
|
||||||
|
selEnd.y=e->curSubSong->patLen-1;
|
||||||
|
|
||||||
|
finishSelection();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (fullRow) {
|
if (fullRow) {
|
||||||
selStart.xCoarse=firstChannel;
|
selStart.xCoarse=firstChannel;
|
||||||
|
@ -314,4 +329,4 @@ void FurnaceGUI::editAdvance() {
|
||||||
selStart=cursor;
|
selStart=cursor;
|
||||||
selEnd=cursor;
|
selEnd=cursor;
|
||||||
updateScroll(cursor.y);
|
updateScroll(cursor.y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -950,6 +950,7 @@ class FurnaceGUI {
|
||||||
int volCellSpacing;
|
int volCellSpacing;
|
||||||
int effectCellSpacing;
|
int effectCellSpacing;
|
||||||
int effectValCellSpacing;
|
int effectValCellSpacing;
|
||||||
|
int doubleClickColumn;
|
||||||
unsigned int maxUndoSteps;
|
unsigned int maxUndoSteps;
|
||||||
String mainFontPath;
|
String mainFontPath;
|
||||||
String patFontPath;
|
String patFontPath;
|
||||||
|
@ -1048,6 +1049,7 @@ class FurnaceGUI {
|
||||||
volCellSpacing(0),
|
volCellSpacing(0),
|
||||||
effectCellSpacing(0),
|
effectCellSpacing(0),
|
||||||
effectValCellSpacing(0),
|
effectValCellSpacing(0),
|
||||||
|
doubleClickColumn(1),
|
||||||
maxUndoSteps(100),
|
maxUndoSteps(100),
|
||||||
mainFontPath(""),
|
mainFontPath(""),
|
||||||
patFontPath(""),
|
patFontPath(""),
|
||||||
|
|
|
@ -404,6 +404,11 @@ void FurnaceGUI::drawSettings() {
|
||||||
settings.cursorMoveNoScroll=cursorMoveNoScrollB;
|
settings.cursorMoveNoScroll=cursorMoveNoScrollB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool doubleClickColumnB=settings.doubleClickColumn;
|
||||||
|
if (ImGui::Checkbox("Double click selects entire column",&doubleClickColumnB)) {
|
||||||
|
settings.doubleClickColumn=doubleClickColumnB;
|
||||||
|
}
|
||||||
|
|
||||||
bool allowEditDockingB=settings.allowEditDocking;
|
bool allowEditDockingB=settings.allowEditDocking;
|
||||||
if (ImGui::Checkbox("Allow docking editors",&allowEditDockingB)) {
|
if (ImGui::Checkbox("Allow docking editors",&allowEditDockingB)) {
|
||||||
settings.allowEditDocking=allowEditDockingB;
|
settings.allowEditDocking=allowEditDockingB;
|
||||||
|
@ -2009,7 +2014,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
settings.insCellSpacing=e->getConfInt("insCellSpacing",0);
|
settings.insCellSpacing=e->getConfInt("insCellSpacing",0);
|
||||||
settings.volCellSpacing=e->getConfInt("volCellSpacing",0);
|
settings.volCellSpacing=e->getConfInt("volCellSpacing",0);
|
||||||
settings.effectCellSpacing=e->getConfInt("effectCellSpacing",0);
|
settings.effectCellSpacing=e->getConfInt("effectCellSpacing",0);
|
||||||
settings.effectValCellSpacing=e->getConfInt("effectValCellSpacing",0);
|
settings.doubleClickColumn=e->getConfInt("doubleClickColumn",0);
|
||||||
|
|
||||||
clampSetting(settings.mainFontSize,2,96);
|
clampSetting(settings.mainFontSize,2,96);
|
||||||
clampSetting(settings.patFontSize,2,96);
|
clampSetting(settings.patFontSize,2,96);
|
||||||
|
@ -2092,6 +2097,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
clampSetting(settings.volCellSpacing,0,32);
|
clampSetting(settings.volCellSpacing,0,32);
|
||||||
clampSetting(settings.effectCellSpacing,0,32);
|
clampSetting(settings.effectCellSpacing,0,32);
|
||||||
clampSetting(settings.effectValCellSpacing,0,32);
|
clampSetting(settings.effectValCellSpacing,0,32);
|
||||||
|
clampSetting(settings.doubleClickColumn,0,1);
|
||||||
|
|
||||||
settings.initialSys=e->decodeSysDesc(e->getConfString("initialSys",""));
|
settings.initialSys=e->decodeSysDesc(e->getConfString("initialSys",""));
|
||||||
if (settings.initialSys.size()<4) {
|
if (settings.initialSys.size()<4) {
|
||||||
|
@ -2223,6 +2229,7 @@ void FurnaceGUI::commitSettings() {
|
||||||
e->setConf("volCellSpacing",settings.volCellSpacing);
|
e->setConf("volCellSpacing",settings.volCellSpacing);
|
||||||
e->setConf("effectCellSpacing",settings.effectCellSpacing);
|
e->setConf("effectCellSpacing",settings.effectCellSpacing);
|
||||||
e->setConf("effectValCellSpacing",settings.effectValCellSpacing);
|
e->setConf("effectValCellSpacing",settings.effectValCellSpacing);
|
||||||
|
e->setConf("doubleClickColumn",settings.doubleClickColumn);
|
||||||
|
|
||||||
// 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