the changes

This commit is contained in:
tildearrow 2025-10-04 04:06:28 -05:00
parent f9372ec53f
commit 3879706006
2 changed files with 17 additions and 8 deletions

View file

@ -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; i<e->getTotalChannelCount(); 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);

View file

@ -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;
}