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
Given a scene with a MenuBar node and a PopupMenu child node the method get_menu_title returns the child node's name. This is confusing, since a PopupMenu has a property called title (inherited from the Window node).
This is also problematic, because when running the project, the menu items' labels reflect their respective node's name, not title. Thus it is impossible to create the following menu bar from the editor:
[File] [Edit] [View] [View]
since names have to be unique.
It is generally undesired for node names to have an effect on the game.
Steps to reproduce
Create a scene with a MenuBar node as root. Create a PopupMenu child node and name it "NAME". In the editor (under the window category) set the title property to "TITLE".
Run get_menu_title(0) on the root node. Notice the result is "NAME" instead of the expected "TITLE".
Thus it is impossible to create the following menu bar from the editor
You can use set_menu_title method to set custom titles.
But since title exist in all Windows and is not doing anything for the borderless PopupMenu window, we probably should support it as a menu title as well.
Tested versions
Godot version: 4.3.stable
System information
Debian 12 Bookworm
Issue description
Given a scene with a
MenuBar
node and aPopupMenu
child node the methodget_menu_title
returns the child node's name. This is confusing, since aPopupMenu
has a property called title (inherited from theWindow
node).This is also problematic, because when running the project, the menu items' labels reflect their respective node's name, not title. Thus it is impossible to create the following menu bar from the editor:
[File] [Edit] [View] [View]
since names have to be unique.
It is generally undesired for node names to have an effect on the game.
Steps to reproduce
Create a scene with a
MenuBar
node as root. Create aPopupMenu
child node and name it "NAME". In the editor (under the window category) set thetitle
property to "TITLE".Run
get_menu_title(0)
on the root node. Notice the result is "NAME" instead of the expected "TITLE".Minimal reproduction project (MRP)
Minimal reproduction project.zip
The text was updated successfully, but these errors were encountered: