-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delayed tooltips & delayed IsItemHovered() #1485
Comments
Hello Alexander, I added a timer a while ago to track an internal timer along with the If you want to only use it on items that have identifiers (typically items that react to clicks), as a workaround for know you may do this:
Which you'd probably wrap as a custom helper e.g. But this won't work on Text and other items because the timer isn't tracked for them. I'll have to think about how we can provide a more general solution to this problem. The drag and drop branch had to solve similar issues to allow every item to be used as a drag source/target, and there are solution that may be viable for this use case as well. |
Awesome! That workaround worked. Thanks a bunch. If you get around to implementing a general-ish solution for this, I was originally looking for a sister function to |
…_DelayShort, ImGuiHoveredFlags_NoSharedDelay. (#1485) IsItemHovered() can't have a non-zero default, but higher-level tooltip helpers may enable a different default later.
Now added the following, long-awaited helper.
IO:
It works on items that have no identifier (e.g. I consider this a low-level helper. e.g.
I've seen all of those. I am not yet sure what are the desirable default and desirable amount of configuration (less configuration would be good: if any, most of them should be global "style" settings and not per instance). I was tempted to use names carrying more semantic e.g. Feedback welcome! |
…iable (and is rather complex with upcoming addition of stationary logic). (#1485) + Tweaked default value of io.HoverDelayNormal from 0.30 to 0.35.
…rDelayShort/style.HoverDelayNormal. (#1485)
…eredFlags_Stationary. (#1485) Update demo accordingly.
…eredFlagsForTooltipNav now pulled by ImGuiHoveredFlags_Tooltip. (#1485)
I have amended this with new commits:
TL;DR; Added Stationary test. Added an indirection so using I'll close this issue now. |
…amerates with lower rate of mouse inputs. (#1485)
…_ForTooltip) defaults to activate tooltips on disabled items.. (#1485)
…GuiHoveredFlags_DelayXXXX override. (#1485)
For a special case, I was trying to (temporary) modify the |
Couldn't find a previous issue or tip on it. I want to only show the tooltip after i number of seconds, rather than immediately. Am I missing some function to do that or is there a better way rather than to keep a timer based on
IsItemHovered()
for each item?The text was updated successfully, but these errors were encountered: