mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-12-22 07:35:56 +00:00
Don't double-present popup menu item text in cases where the item and shortcut resource name are identical.
This commit is contained in:
parent
fc5b591fe3
commit
22bb195db0
|
@ -225,15 +225,16 @@ func popup_menu_item_id_focused(index):
|
|||
print_debug("item id focus %s" % index)
|
||||
var tokens = PoolStringArray([])
|
||||
var shortcut = node.get_item_shortcut(index)
|
||||
var name
|
||||
if shortcut:
|
||||
var name = shortcut.resource_name
|
||||
name = shortcut.resource_name
|
||||
if name:
|
||||
tokens.append(name)
|
||||
var text = shortcut.get_as_text()
|
||||
if text != "None":
|
||||
tokens.append(text)
|
||||
var item = node.get_item_text(index)
|
||||
if item:
|
||||
if item and item != name:
|
||||
tokens.append(item)
|
||||
var submenu = node.get_item_submenu(index)
|
||||
if submenu:
|
||||
|
|
Loading…
Reference in New Issue
Block a user