| 3970 | } |
| 3971 | |
| 3972 | static inline float CalcDelayFromHoveredFlags(ImGuiHoveredFlags flags) |
| 3973 | { |
| 3974 | ImGuiContext& g = *GImGui; |
| 3975 | if (flags & ImGuiHoveredFlags_DelayShort) |
| 3976 | return g.Style.HoverDelayShort; |
| 3977 | if (flags & ImGuiHoveredFlags_DelayNormal) |
| 3978 | return g.Style.HoverDelayNormal; |
| 3979 | return 0.0f; |
| 3980 | } |
| 3981 | |
| 3982 | // This is roughly matching the behavior of internal-facing ItemHoverable() |
| 3983 | // - we allow hovering to be true when ActiveId==window->MoveID, so that clicking on non-interactive items such as a Text() item still returns true with IsItemHovered() |