findPopupMenu

fun findPopupMenu(menuItem: Node): PopupMenu?

Given an item in a PopupMenu, this finds the PopupMenu.

There is no direct relationship from items in a PopupMenu to the PopupMenu, but finding it is easy, because PopupMenus are the root node of the scene.

Returns null, if menuItem isn't currently shown (or is part of a scene which isn't a popup menu).

menuItem can be any node, but is almost always a MenuItemBase.