GUI: add ability to drag to move when holding Ctrl

This commit is contained in:
tildearrow 2022-06-20 16:24:14 -05:00
parent 60334fb03c
commit 57fab16269
2 changed files with 14 additions and 8 deletions

View file

@ -43,7 +43,7 @@ void FurnaceGUI::startSelection(int xCoarse, int xFine, int y, bool fullRow) {
}
}
if (settings.dragMovesSelection && !fullRow) {
if ((settings.dragMovesSelection==1 || (settings.dragMovesSelection==2 && (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;