mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Change badly named variable in ExtensionsAPI
This commit is contained in:
parent
acebbdf031
commit
c5e2e1ce4c
|
@ -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:
|
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)
|
var popup_menu: PopupMenu = _get_popup_menu(menu_type)
|
||||||
if not image_menu:
|
if not popup_menu:
|
||||||
return -1
|
return -1
|
||||||
image_menu.add_item(item_name, item_id)
|
popup_menu.add_item(item_name, item_id)
|
||||||
var idx := item_id
|
var idx := item_id
|
||||||
if item_id == -1:
|
if item_id == -1:
|
||||||
idx = image_menu.get_item_count() - 1
|
idx = popup_menu.get_item_count() - 1
|
||||||
image_menu.set_item_metadata(idx, item_metadata)
|
popup_menu.set_item_metadata(idx, item_metadata)
|
||||||
|
|
||||||
return idx
|
return idx
|
||||||
|
|
||||||
|
|
||||||
func remove_menu_item(menu_type: int, item_idx: int) -> void:
|
func remove_menu_item(menu_type: int, item_idx: int) -> void:
|
||||||
var image_menu: PopupMenu = _get_popup_menu(menu_type)
|
var popup_menu: PopupMenu = _get_popup_menu(menu_type)
|
||||||
if not image_menu:
|
if not popup_menu:
|
||||||
return
|
return
|
||||||
image_menu.remove_item(item_idx)
|
popup_menu.remove_item(item_idx)
|
||||||
|
|
||||||
|
|
||||||
func add_tool(
|
func add_tool(
|
||||||
|
|
Loading…
Reference in a new issue