You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's top secret, but heavily UI based with trees of nested menus.
Describe the problem or limitation you are having in your project
MenuButtons on my bottom toolbar appear over top of the mouse position instead of above the button.
This is sort of an issue with the Godot editor too.
In Qt and other frameworks this doesn't happen if say we're at the bottom of the screen. It will push it up like Godot, but also push it above the button/control so its not covering the control.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
MenuButton should have a "popup_location" property like other frameworks that lets you set the default popup location. Also, none of the modes should ever allow the popup to cover its parent that showed it by default, unless it absolutely has too.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
There would be a "popup_location" property on MenuButton, with current BELOW behavior the default. When the popup is about to show it will take the enum into account.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It's hacky but the only way I found was to calculate it myself and set the popup menu location in _process.
Is there a reason why this should be core and not an add-on in the asset library?
Yes, it's very important to have normal popup menus that don't get in the way. Toolbars in game UI aren't always at the top of the screen. It's kind of an issue in the Godot editor too where tooltips appear right under the mouse.
The text was updated successfully, but these errors were encountered:
Can't we just change the default behavior so the popup doesn't overlap the MenuButton anymore unless it has to? I would prefer this over adding an extra opt-in property that just ensures we match Qt's usability here.
Calinou
changed the title
Feature: MenuButton Popup Location Property
Add a Popup Location property to MenuButton
Jan 2, 2025
I'd be ok with that as long as it recognizes also to put left anchored button tooltips to the right and vice versa just like bottom toolbars should be above. In other words, AUTO should move the tooltip inwards opposite the direction of the screen edge until it no longer covers the control.
The only exception is OptionButton (the combo control), although I don't personally need it, I can see some people wanting to use a combo with up/left/right arrow instead of simply a down arrow.
Describe the project you are working on
It's top secret, but heavily UI based with trees of nested menus.
Describe the problem or limitation you are having in your project
MenuButtons on my bottom toolbar appear over top of the mouse position instead of above the button.
This is sort of an issue with the Godot editor too.
In Qt and other frameworks this doesn't happen if say we're at the bottom of the screen. It will push it up like Godot, but also push it above the button/control so its not covering the control.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
MenuButton should have a "popup_location" property like other frameworks that lets you set the default popup location. Also, none of the modes should ever allow the popup to cover its parent that showed it by default, unless it absolutely has too.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
There would be a "popup_location" property on MenuButton, with current BELOW behavior the default. When the popup is about to show it will take the enum into account.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It's hacky but the only way I found was to calculate it myself and set the popup menu location in
_process
.Is there a reason why this should be core and not an add-on in the asset library?
Yes, it's very important to have normal popup menus that don't get in the way. Toolbars in game UI aren't always at the top of the screen. It's kind of an issue in the Godot editor too where tooltips appear right under the mouse.
The text was updated successfully, but these errors were encountered: