Skip to content
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

BeginTooltipEx and disallowed focus navigation. #1294

Closed
galop1n opened this issue Aug 23, 2017 · 5 comments
Closed

BeginTooltipEx and disallowed focus navigation. #1294

galop1n opened this issue Aug 23, 2017 · 5 comments
Labels
nav keyboard/gamepad navigation tooltips

Comments

@galop1n
Copy link

galop1n commented Aug 23, 2017

Hi,

Currently, the navigation branch navigation focus can pick any drawn tooltip, but in the case of a mere informative text display, it feels wrong.

Sadly, BeginTooltip is parameter less, there is no such things like SetNextWindowFlags and ImGuiWindowFlags_Tooltip is marked private ( to call Begin with the proper flags of a tooltip in addition to the extra navigation flags i need )

It looks like the other need you were looking for arise :
// Not exposed publicly as BeginTooltip() because bool parameters are evil. Let's see if other needs arise first.
static void BeginTooltipEx(bool override_previous_tooltip)

@galop1n galop1n changed the title BeginTooltipEx and disallow navigation focus on tooltip BeginTooltipEx and disallowed focus navigation. Aug 23, 2017
@ocornut
Copy link
Owner

ocornut commented Aug 24, 2017

Nicolas,

"the navigation branch navigation focus can pick any drawn tooltip"

I'm not sure I understand the details of your post. Could you clarify what you mean and what you want?
Are you bothered by the fact that the common IsItemHovered+BeginTooltip pattern executes when using gamepad/keyboard navigation over a widget? It seemed like a reasonable way to access all available information when using navigation. I presume in your use case it may be visually noisy?

Are you suggesting that BeginTooltip() could have a flag to somehow not show when using navigation? Or perhaps IsItemHovered() ? Is that's by default when we may need a way for navigation user to access that info somehow. It's not by a default perhaps we don't need an alternate way.

@ocornut ocornut added the nav keyboard/gamepad navigation label Aug 24, 2017
@galop1n
Copy link
Author

galop1n commented Aug 24, 2017

Sorry for being unclear. To display the tooltip is fine, or i would just not call the code for it. What i am talking about is the window navigation cycle system ( hold square/X + LB/RB in your default setup ). When the tooltip is just an informative text, it feels wrong to have the navigation selection frame able to show on it, the tooltip should not be a valid target.

The argument to BeginTooltip i desire is to let it set ImGuiWindowFlags_NoNavFocus to prevent that.

@ocornut
Copy link
Owner

ocornut commented Aug 24, 2017

Oh, I see! So it becomes a very simple problem, because tooltips are not meant to be interacted with, this should be the default. (as they follow the mouse cursor you typically cannot interact with them at all). Will add it now.

@ocornut
Copy link
Owner

ocornut commented Aug 24, 2017

Should be fixed now. Let me know if it works for you!

@galop1n
Copy link
Author

galop1n commented Aug 24, 2017

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nav keyboard/gamepad navigation tooltips
Projects
None yet
Development

No branches or pull requests

2 participants