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

Method getSubMenu

gui/builtinContextMenus/resistMode.py:50–58  ·  view source on GitHub ↗
(self, callingWindow, context, mainItem, selection, rootMenu, i, pitem)

Source from the content-addressed store, hash-verified

48 return menuItem
49
50 def getSubMenu(self, callingWindow, context, mainItem, selection, rootMenu, i, pitem):
51 msw = True if "wxMSW" in wx.PlatformInfo else False
52 self.optionIds = {}
53 sub = wx.Menu()
54 for optionLabel, optionValue in optionMap.items():
55 menuItem = self.addOption(rootMenu if msw else sub, optionLabel)
56 sub.Append(menuItem)
57 menuItem.Check(mainItem.resistMode == optionValue)
58 return sub
59
60 def handleMode(self, event):
61 optionLabel = self.optionIds[event.Id]

Callers

nothing calls this directly

Calls 2

addOptionMethod · 0.95
itemsMethod · 0.80

Tested by

no test coverage detected