GUI: add more options for selection drag
ability to copy by dragging selection
This commit is contained in:
parent
e22d46e619
commit
b64c06dd4d
6 changed files with 21 additions and 7 deletions
|
|
@ -43,7 +43,7 @@ void FurnaceGUI::startSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((settings.dragMovesSelection==1 || (settings.dragMovesSelection==2 && (ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)))) && !fullRow) {
|
||||
if (((settings.dragMovesSelection==1 || settings.dragMovesSelection==3 || settings.dragMovesSelection==5) || ((settings.dragMovesSelection==2 || settings.dragMovesSelection==4) && (ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)))) && !fullRow) {
|
||||
if (xCoarse>=selStart.xCoarse && (xFine>=selStart.xFine || xCoarse>selStart.xCoarse) && y>=selStart.y &&
|
||||
xCoarse<=selEnd.xCoarse && (xFine<=selEnd.xFine || xCoarse<selEnd.xCoarse) && y<=selEnd.y) {
|
||||
dragging=true;
|
||||
|
|
@ -176,7 +176,7 @@ void FurnaceGUI::finishSelection() {
|
|||
selStart=cursorDrag;
|
||||
selEnd=cursorDrag;
|
||||
} else { // perform drag
|
||||
doDrag();
|
||||
doDrag(settings.dragMovesSelection==3 || settings.dragMovesSelection==4 || (settings.dragMovesSelection==5 && (ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl))));
|
||||
}
|
||||
|
||||
dragging=false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue