mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Inputs: SetNextItemShortcut() with ImGuiInputFlags_Tooltip doesn't show tooltip when item is active.
This commit is contained in:
parent
dad9f45e3e
commit
6aade6912a
2 changed files with 2 additions and 1 deletions
|
|
@ -4343,7 +4343,7 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag
|
|||
|
||||
// Display shortcut (only works with mouse)
|
||||
// (ImGuiItemStatusFlags_HasShortcut in LastItemData denotes we want a tooltip)
|
||||
if (id == g.LastItemData.ID && (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_HasShortcut))
|
||||
if (id == g.LastItemData.ID && (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_HasShortcut) && g.ActiveId != id)
|
||||
if (IsItemHovered(ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_DelayNormal))
|
||||
SetTooltip("%s", GetKeyChordName(g.LastItemData.Shortcut));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue