1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Change badly named variable in ExtensionsAPI

This commit is contained in:
Emmanouil Papadeas 2022-07-29 20:51:45 +03:00
parent acebbdf031
commit c5e2e1ce4c

View file

@ -52,23 +52,23 @@ func _get_popup_menu(menu_type: int) -> PopupMenu:
func add_menu_item(menu_type: int, item_name: String, item_metadata, item_id := -1) -> int:
var image_menu: PopupMenu = _get_popup_menu(menu_type)
if not image_menu:
var popup_menu: PopupMenu = _get_popup_menu(menu_type)
if not popup_menu:
return -1
image_menu.add_item(item_name, item_id)
popup_menu.add_item(item_name, item_id)
var idx := item_id
if item_id == -1:
idx = image_menu.get_item_count() - 1
image_menu.set_item_metadata(idx, item_metadata)
idx = popup_menu.get_item_count() - 1
popup_menu.set_item_metadata(idx, item_metadata)
return idx
func remove_menu_item(menu_type: int, item_idx: int) -> void:
var image_menu: PopupMenu = _get_popup_menu(menu_type)
if not image_menu:
var popup_menu: PopupMenu = _get_popup_menu(menu_type)
if not popup_menu:
return
image_menu.remove_item(item_idx)
popup_menu.remove_item(item_idx)
func add_tool(