There are "singles" and "submenus" - singles being those that have no parent and are in the root of the menu
Discussion
For damage profile context menu:
Before these changes, pyfa expected a list of root menu items, or a single menu item that would drop into a submenu. There was no functionality to create multiple root menu items and multiple submenus. I got around this but separating the singles from the submenus and making a list of them. Then in the getSubMenu method, determined if we were looking at a single or submenu. If single, redirect the event from the default activate to a custom one (needed to support the submenus). This required passing an additional argument to getSubMenu: the wxID of the current root menu item.
Discussion
For damage profile context menu:
Before these changes, pyfa expected a list of root menu items, or a single menu item that would drop into a submenu. There was no functionality to create multiple root menu items and multiple submenus. I got around this but separating the singles from the submenus and making a list of them. Then in the
getSubMenu
method, determined if we were looking at a single or submenu. If single, redirect the event from the defaultactivate
to a custom one (needed to support the submenus). This required passing an additional argument togetSubMenu
: the wxID of the current root menu item.