You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the text get resized, IsItemHovered(ImGuiHoveredFlags_ForTooltip) for the text will become 0, even if the mouse remains hovering on the resized one. This can make the tooltip (based on BeginItemTooltip) for the text disappear for a very short time, which I think is not ideal behavior.
Screenshots/Video:
(The tooltip will disappear for a short time when pressing 'Z'.)
Minimal, Complete and Verifiable Example code:
voidissue() {
if (ImGui::Begin("Issue", 0, ImGuiWindowFlags_NoSavedSettings)) {
staticbool i = 0;
if (ImGui::IsKeyPressed(ImGuiKey_Z)) {
i = !i;
}
ImGui::Text(i ? "ABCDEFG" : "ABCD");
if (ImGui::BeginItemTooltip()) {
ImGui::Text("...");
ImGui::EndTooltip();
}
// Will become 0 when the text is resized:ImGui::Text("%d", int(ImGui::IsItemHovered(ImGuiHoveredFlags_ForTooltip)));
}
ImGui::End();
}
The text was updated successfully, but these errors were encountered:
…implicit ID using Pos only. (#7945, #1485, #143)
Perhaps a better approach would be to: store last non-zero ID + count successive zero ID and combine then.
I have pushed a fix as f99febf. I think we may end revisiting this by reworking how we create implicit id for e.g. Text() by using counters, this may apply to drag and drop sources as well.
Version/Branch of Dear ImGui:
Version 1.90.9
Back-ends:
imgui_impl_sdl2.cpp + imgui_impl_sdlrenderer2.cpp
Compiler, OS:
Windows 10 + MSVC 2022
Full config/build information:
No response
Details:
When the text get resized,
IsItemHovered(ImGuiHoveredFlags_ForTooltip)
for the text will become 0, even if the mouse remains hovering on the resized one. This can make the tooltip (based onBeginItemTooltip
) for the text disappear for a very short time, which I think is not ideal behavior.Screenshots/Video:
(The tooltip will disappear for a short time when pressing 'Z'.)
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: