-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow showing tooltips with a slight time delay #3232
Comments
It could have a field in Style like animation_time, or even just use Another feature that other UI frameworks have is that the tooltip disappears when you press a key, and doesn't reappear until you move the pointer again. But that could probably be a separate issue, if egui users are interested in it. |
I think it makes most sense with a global You can follow the bread-crumbs of the similar |
Similar to the show_tooltips_only_when_still option, but allows the user to configure a specific delay in seconds, and also makes the tooltip disappear if the mouse is moved again. Closes emilk#3232
* Add tooltip_delay option Similar to the show_tooltips_only_when_still option, but allows the user to configure a specific delay in seconds, and also makes the tooltip disappear if the mouse is moved again. Closes #3232 * Update crates/egui/src/response.rs Co-authored-by: Emil Ernerfeldt <[email protected]> --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
The current way to show a tooltip, as far as I can tell, is to use on_hover_text and friends.
These methods show a custom tooltip almost immediately when an item is hovered. This might be desired in some cases, but it can also be distracting because the tooltip is shown even when the mouse just quickly crosses an item. That's why tooltips are usually shown after a small time delay so that they only show up when actually needed.
I have no idea about the implementation, but I think it would be nice to have some methods like
on_hover_text_delayed
or similar that show a tooltip only after a certain time of continuous hovering. The time delay could be part of the style.The text was updated successfully, but these errors were encountered: