From cfaa220243201eb2e2f9777dc2ecfe6f995e486a Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 19 Aug 2023 02:29:23 -0500 Subject: [PATCH] IGFD: fix tooltip not appearing --- extern/igfd/ImGuiFileDialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extern/igfd/ImGuiFileDialog.cpp b/extern/igfd/ImGuiFileDialog.cpp index fbdd00f0..fd63e8c2 100644 --- a/extern/igfd/ImGuiFileDialog.cpp +++ b/extern/igfd/ImGuiFileDialog.cpp @@ -3913,8 +3913,9 @@ namespace IGFD prFileDialogInternal.puIsOk = true; res = true; } + ImGui::EndDisabled(); if (!(prFileDialogInternal.puCanWeContinue && notEmpty && fileValid==0)) { - if (ImGui::IsItemHovered()) { + if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) { if (!notEmpty) { if (prFileDialogInternal.puDLGflags&ImGuiFileDialogFlags_ConfirmOverwrite) { ImGui::SetTooltip("file name is empty"); @@ -3925,7 +3926,11 @@ namespace IGFD ImGui::SetTooltip("we can't continue - this is most likely a bug!"); } else switch (fileValid) { case 1: +#ifdef _WIN32 ImGui::SetTooltip("invalid characters in file name\nmake sure there aren't any of these:\n < > : \" / \\ | ? *"); +#else + ImGui::SetTooltip("invalid characters in file name\nmake sure there aren't any slashes (/)"); +#endif break; case 2: ImGui::SetTooltip("this file name is reserved by the system"); @@ -3939,7 +3944,6 @@ namespace IGFD } } } - ImGui::EndDisabled(); ImGui::SameLine();