-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Labels
Milestone
Description
Godot version:
Latest from: https://hugo.pro/projects/godot-builds/ (v3.1.beta.calinou.c21ca98)
OS/device including version:
Windows 10
Issue description:
MenuButton items lose the label when a shortcut is set.
Steps to reproduce:
- Create new scene with a Control node as the root
- Add MenuButton node
- Add this code to the root node:
extends Control
func _ready():
# Add items
$MenuButton.get_popup().add_item("I'm a regular item")
$MenuButton.get_popup().add_item("I am not")
# Create the shortcut
var shortcut = ShortCut.new()
var inputeventkey = InputEventKey.new()
inputeventkey.set_scancode(KEY_Q)
inputeventkey.control = true
shortcut.set_shortcut(inputeventkey)
# Set shortcut
$MenuButton.get_popup().set_item_shortcut(1, shortcut, true)
- Run project and check how the label on the second menu item is gone.
Minimal reproduction project:
MenuButtonItemBug.zip