From 3879706006fe9e6e4946f186bec0ceca366c2084 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 4 Oct 2025 04:06:28 -0500 Subject: [PATCH] the changes --- src/gui/channels.cpp | 5 ++--- src/gui/newFilePicker.cpp | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/gui/channels.cpp b/src/gui/channels.cpp index 2e8c4d276..091a4103a 100644 --- a/src/gui/channels.cpp +++ b/src/gui/channels.cpp @@ -50,7 +50,6 @@ void FurnaceGUI::drawChannels() { ImGui::TableNextColumn(); ImGui::Text(_("Osc")); ImGui::TableNextColumn(); - ImGui::Text("%s", ""); ImGui::TableNextColumn(); ImGui::Text(_("Name")); for (int i=0; igetTotalChannelCount(); i++) { @@ -79,14 +78,14 @@ void FurnaceGUI::drawChannels() { ImGui::Button(ICON_FA_ARROWS "##ChanDrag"); ImGui::EndDragDropSource(); } else if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(_("%s #%d\n(drag to swap channels)\n(shift+drag to copy channel contents)"),e->getSystemName(e->sysOfChan[i]),e->dispatchChanOfChan[i]); + ImGui::SetTooltip(_("%s #%d\n(drag to swap channels)\n(Shift-drag to copy channel contents)"),e->getSystemName(e->sysOfChan[i]),e->dispatchChanOfChan[i]); } if (ImGui::BeginDragDropTarget()) { const ImGuiPayload* dragItem=ImGui::AcceptDragDropPayload("FUR_CHAN"); if (dragItem!=NULL) { if (dragItem->IsDataType("FUR_CHAN")) { if (chanToMove!=i && chanToMove>=0) { - if (ImGui::IsKeyDown(ImGuiKey_LeftShift)) + if (ImGui::IsKeyDown(ImGuiKey_LeftShift) || ImGui::IsKeyDown(ImGuiKey_RightShift)) e->copyChannelP(chanToMove,i); else e->swapChannelsP(chanToMove,i); diff --git a/src/gui/newFilePicker.cpp b/src/gui/newFilePicker.cpp index 32f1bb676..bb4c53ffe 100644 --- a/src/gui/newFilePicker.cpp +++ b/src/gui/newFilePicker.cpp @@ -1354,7 +1354,7 @@ bool FurnaceFilePicker::draw(ImGuiWindowFlags winFlags) { ImGui::SameLine(); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x-(ImGui::GetStyle().ItemSpacing.x+ImGui::GetStyle().FramePadding.x*2.0f+ImGui::CalcTextSize(_("OK")).x)); ImGui::InputText("##EditablePath",&editablePath); - if ((ImGui::IsKeyDown(ImGuiKey_Enter) || ImGui::IsKeyReleased(ImGuiKey_Enter)) && ImGui::IsItemDeactivatedAfterEdit()) { + if ((ImGui::IsKeyPressed(ImGuiKey_Enter) || ImGui::IsKeyReleased(ImGuiKey_Enter)) && ImGui::IsItemDeactivatedAfterEdit()) { newDir=editablePath; } ImGui::SameLine(); @@ -1449,6 +1449,12 @@ bool FurnaceFilePicker::draw(ImGuiWindowFlags winFlags) { if (ImGui::InputTextWithHint("##Filter",_("Search"),&filter)) { filterFiles(); } + if ((ImGui::IsKeyDown(ImGuiKey_Enter) || ImGui::IsKeyReleased(ImGuiKey_Enter)) && ImGui::IsItemDeactivated()) { + newDir=path; + if (!filter.empty()) { + wantSearch=true; + } + } ImGui::SameLine(); if (isSearch && !haveFiles) { if (ImGui::Button(ICON_FA_TIMES "##RecurseStop")) { @@ -1459,10 +1465,6 @@ bool FurnaceFilePicker::draw(ImGuiWindowFlags winFlags) { ImGui::BeginDisabled(filter.empty()); if (ImGui::Button(ICON_FA_SEARCH "##Recurse")) { newDir=path; - searchQuery=filter; - for (char& i: searchQuery) { - if (i>='A' && i<='Z') i+='a'-'A'; - } wantSearch=true; } ImGui::SetItemTooltip(_("Search recursively")); @@ -1746,6 +1748,12 @@ bool FurnaceFilePicker::draw(ImGuiWindowFlags winFlags) { // change directory if (clearSearchOnDirChange) filter=""; isSearch=wantSearch; + if (wantSearch) { + searchQuery=filter; + for (char& i: searchQuery) { + if (i>='A' && i<='Z') i+='a'-'A'; + } + } readDirectory(newDir); } return (curStatus!=FP_STATUS_WAITING); @@ -1787,6 +1795,8 @@ bool FurnaceFilePicker::open(String name, String pa, String hint, int flags, con } hint=entryNameHint; isOpen=true; + + //ImGui::GetIO().ConfigFlags|=ImGuiConfigFlags_NavEnableKeyboard; return true; }