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

Make opening menus with the same parent on mouse focus explicit #20609

Merged
merged 1 commit into from
Dec 9, 2018

Conversation

YeldhamDev
Copy link
Member

@YeldhamDev YeldhamDev commented Jul 30, 2018

The current behaviour happens with any MenuButton without an icon with the same parent, and while it works it has some problems:

  • The behaviour is hidden from the developer.
  • There's no way to disable this behaviour without having to make the MenuButton have an exclusive parent. Such situations that its deactivation is desired happens in the editor itself:
    peek 2018-07-30 00-32

So, I made that the behaviour is explicit, by enabling switch_on_hover, it only happens if both the current MenuButton and the one being hovered have it enabled.

I also fixed #20525.

@akien-mga akien-mga added this to the 3.1 milestone Aug 13, 2018
@YeldhamDev YeldhamDev force-pushed the menu_hover_explicit branch 3 times, most recently from bd0e469 to 6f06a0b Compare August 21, 2018 07:05
@YeldhamDev YeldhamDev force-pushed the menu_hover_explicit branch from 6f06a0b to 70829c3 Compare August 27, 2018 17:55
@YeldhamDev
Copy link
Member Author

Added documentation.

@guilhermefelipecgs If you don't have anymore protests, I think this is good to go.

@YeldhamDev YeldhamDev force-pushed the menu_hover_explicit branch 2 times, most recently from 69c79ae to 4ce28f6 Compare November 2, 2018 03:33
@YeldhamDev
Copy link
Member Author

Conflicts solved.

doc/classes/MenuButton.xml Outdated Show resolved Hide resolved
scene/gui/menu_button.cpp Outdated Show resolved Hide resolved
@YeldhamDev
Copy link
Member Author

@bojidar-bg Thanks for heads-up. The doc suggestions were also implemented.

@akien-mga akien-mga merged commit bf59b73 into godotengine:master Dec 9, 2018
@akien-mga
Copy link
Member

Thanks!

@YeldhamDev YeldhamDev deleted the menu_hover_explicit branch December 11, 2018 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabled popup buttons can be pressed if active ones are also present
5 participants