mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-21 19:45:55 +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)
|
print_debug("item id focus %s" % index)
|
||||||
var tokens = PoolStringArray([])
|
var tokens = PoolStringArray([])
|
||||||
var shortcut = node.get_item_shortcut(index)
|
var shortcut = node.get_item_shortcut(index)
|
||||||
|
var name
|
||||||
if shortcut:
|
if shortcut:
|
||||||
var name = shortcut.resource_name
|
name = shortcut.resource_name
|
||||||
if name:
|
if name:
|
||||||
tokens.append(name)
|
tokens.append(name)
|
||||||
var text = shortcut.get_as_text()
|
var text = shortcut.get_as_text()
|
||||||
if text != "None":
|
if text != "None":
|
||||||
tokens.append(text)
|
tokens.append(text)
|
||||||
var item = node.get_item_text(index)
|
var item = node.get_item_text(index)
|
||||||
if item:
|
if item and item != name:
|
||||||
tokens.append(item)
|
tokens.append(item)
|
||||||
var submenu = node.get_item_submenu(index)
|
var submenu = node.get_item_submenu(index)
|
||||||
if submenu:
|
if submenu:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user