MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / makeMenu

Method makeMenu

gui/builtinContextMenus/damagePatternChange.py:75–87  ·  view source on GitHub ↗
(container, parentMenu)

Source from the content-addressed store, hash-verified

73 msw = "wxMSW" in wx.PlatformInfo
74
75 def makeMenu(container, parentMenu):
76 menu = wx.Menu()
77 for name, subcontainer in container[1].items():
78 menuItem = self._addCategory(rootMenu if msw else parentMenu, name)
79 subMenu = makeMenu(subcontainer, menu)
80 menuItem.SetSubMenu(subMenu)
81 menu.Append(menuItem)
82 for name, pattern in container[0].items():
83 menuItem, checked = self._addPattern(rootMenu if msw else parentMenu, pattern, name)
84 menu.Append(menuItem)
85 menuItem.Check(checked)
86 menu.Bind(wx.EVT_MENU, self.handlePatternSwitch)
87 return menu
88
89 container = list(self.items[1].values())[i - len(self.items[0])]
90 subMenu = makeMenu(container, rootMenu)

Callers

nothing calls this directly

Calls 3

_addCategoryMethod · 0.95
_addPatternMethod · 0.95
itemsMethod · 0.80

Tested by

no test coverage detected