| 3412 | } |
| 3413 | |
| 3414 | void IGFD::KeyExplorerFeature::m_LocateByInputKey(FileDialogInternal& vFileDialogInternal) { |
| 3415 | ImGuiContext& g = *GImGui; |
| 3416 | auto& fdi = vFileDialogInternal.fileManager; |
| 3417 | if (!g.ActiveId && !fdi.IsFilteredListEmpty()) { |
| 3418 | auto& queueChar = ImGui::GetIO().InputQueueCharacters; |
| 3419 | auto countFiles = fdi.GetFilteredListSize(); |
| 3420 | |
| 3421 | // point by char |
| 3422 | if (!queueChar.empty()) { |
| 3423 | ImWchar c = queueChar.back(); |
| 3424 | if (m_LocateFileByInputChar_InputQueueCharactersSize != queueChar.size()) { |
| 3425 | if (c == m_LocateFileByInputChar_lastChar) // next file starting with same char until |
| 3426 | { |
| 3427 | if (m_LocateFileByInputChar_lastFileIdx < countFiles - 1U) |
| 3428 | m_LocateFileByInputChar_lastFileIdx++; |
| 3429 | else |
| 3430 | m_LocateFileByInputChar_lastFileIdx = 0; |
| 3431 | } |
| 3432 | |
| 3433 | if (!m_LocateItem_Loop(vFileDialogInternal, c)) { |
| 3434 | // not found, loop again from 0 this time |
| 3435 | m_LocateFileByInputChar_lastFileIdx = 0; |
| 3436 | m_LocateItem_Loop(vFileDialogInternal, c); |
| 3437 | } |
| 3438 | |
| 3439 | m_LocateFileByInputChar_lastChar = c; |
| 3440 | } |
| 3441 | } |
| 3442 | |
| 3443 | m_LocateFileByInputChar_InputQueueCharactersSize = queueChar.size(); |
| 3444 | } |
| 3445 | } |
| 3446 | |
| 3447 | void IGFD::KeyExplorerFeature::m_ExploreWithkeys(FileDialogInternal& vFileDialogInternal, ImGuiID vListViewID) { |
| 3448 | auto& fdi = vFileDialogInternal.fileManager; |
nothing calls this directly
no test coverage detected