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
|
||||
- add another FM editor layout
|
||||
- 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
|
||||
- Apply button in settings
|
||||
- find and replace
|
||||
|
|
|
@ -28,6 +28,21 @@ void FurnaceGUI::startSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
|||
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) {
|
||||
selStart.xCoarse=firstChannel;
|
||||
selStart.xFine=0;
|
||||
|
|
|
@ -950,6 +950,7 @@ class FurnaceGUI {
|
|||
int volCellSpacing;
|
||||
int effectCellSpacing;
|
||||
int effectValCellSpacing;
|
||||
int doubleClickColumn;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -1048,6 +1049,7 @@ class FurnaceGUI {
|
|||
volCellSpacing(0),
|
||||
effectCellSpacing(0),
|
||||
effectValCellSpacing(0),
|
||||
doubleClickColumn(1),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -404,6 +404,11 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.cursorMoveNoScroll=cursorMoveNoScrollB;
|
||||
}
|
||||
|
||||
bool doubleClickColumnB=settings.doubleClickColumn;
|
||||
if (ImGui::Checkbox("Double click selects entire column",&doubleClickColumnB)) {
|
||||
settings.doubleClickColumn=doubleClickColumnB;
|
||||
}
|
||||
|
||||
bool allowEditDockingB=settings.allowEditDocking;
|
||||
if (ImGui::Checkbox("Allow docking editors",&allowEditDockingB)) {
|
||||
settings.allowEditDocking=allowEditDockingB;
|
||||
|
@ -2009,7 +2014,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.insCellSpacing=e->getConfInt("insCellSpacing",0);
|
||||
settings.volCellSpacing=e->getConfInt("volCellSpacing",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.patFontSize,2,96);
|
||||
|
@ -2092,6 +2097,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.volCellSpacing,0,32);
|
||||
clampSetting(settings.effectCellSpacing,0,32);
|
||||
clampSetting(settings.effectValCellSpacing,0,32);
|
||||
clampSetting(settings.doubleClickColumn,0,1);
|
||||
|
||||
settings.initialSys=e->decodeSysDesc(e->getConfString("initialSys",""));
|
||||
if (settings.initialSys.size()<4) {
|
||||
|
@ -2223,6 +2229,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("volCellSpacing",settings.volCellSpacing);
|
||||
e->setConf("effectCellSpacing",settings.effectCellSpacing);
|
||||
e->setConf("effectValCellSpacing",settings.effectValCellSpacing);
|
||||
e->setConf("doubleClickColumn",settings.doubleClickColumn);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
Loading…
Reference in a new issue