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

PanelContainer hint does not show if it has a MarginContainer child #36170

Closed
ntsik opened this issue Feb 13, 2020 · 1 comment
Closed

PanelContainer hint does not show if it has a MarginContainer child #36170

ntsik opened this issue Feb 13, 2020 · 1 comment

Comments

@ntsik
Copy link

ntsik commented Feb 13, 2020

Godot version: 3.2.stable.official

Issue description: Controls have a hint_tooltip field which displays a hint when hovered. For a PanelContainer with a MarginContainer child, this hint does not display when hovered (by default).

By default, MarginContainer's mouse_filter is set to MOUSE_FILTER_STOP. If it's changed to MOUSE_FILTER_IGNORE, then the parent PanelContainer's hint tooltip will work again.

Steps to reproduce:

  1. Create a PanelContainer
  2. Add a hint_tooltip to the PanelContainer
  3. Add a MarginContainer child to the PanelContainer (by default using MOUSE_FILTER_STOP)
  4. Observe the hint tooltip does not appear upon hovering

Minimal reproduction project:
panel_container_hint_bug.zip

@akien-mga
Copy link
Member

This is not a bug per se, it's as you described it: if a Control has MOUSE_FILTER_STOP, it will prevent its parent container's tooltip from being shown. You should change to MOUSE_FILTER_PASS if you want to forward the event to the parent.

The default mouse filter has been changed for containers in #35068, which incidentally solves this. It's a compat breaking change so it will not be backported to 3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants