From d90a04990b96b7c51ce43689556f37346047a8f5 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 15 May 2024 18:31:27 +0200 Subject: [PATCH] fix: Section button tooltips being visible even when not hovering buttons --- .../builtin/source/content/views/view_pattern_editor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index c608e30f7..62489a998 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -1156,8 +1156,10 @@ namespace hex::plugin::builtin { patternDrawer->draw(patterns, &runtime, 150_scaled); }; } - ImGui::SetTooltip("%s", "hex.builtin.view.pattern_editor.sections.view"_lang.get().c_str()); + ImGui::SetItemTooltip("%s", "hex.builtin.view.pattern_editor.sections.view"_lang.get().c_str()); + ImGui::SameLine(); + if (ImGuiExt::DimmedIconButton(ICON_VS_SAVE_AS, ImGui::GetStyleColorVec4(ImGuiCol_Text))) { fs::openFileBrowser(fs::DialogMode::Save, {}, [id, &runtime](const auto &path) { wolv::io::File file(path, wolv::io::File::Mode::Create); @@ -1169,7 +1171,7 @@ namespace hex::plugin::builtin { file.writeVector(runtime.getSection(id)); }); } - ImGui::SetTooltip("%s", (const char*)"hex.builtin.view.pattern_editor.sections.export"_lang.get().c_str()); + ImGui::SetItemTooltip("%s", (const char*)"hex.builtin.view.pattern_editor.sections.export"_lang.get().c_str()); ImGui::PopID(); }