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

Method getSubMenu

gui/builtinContextMenus/shipModeChange.py:52–64  ·  view source on GitHub ↗
(self, callingWindow, context, rootMenu, i, pitem)

Source from the content-addressed store, hash-verified

50 return menuItem
51
52 def getSubMenu(self, callingWindow, context, rootMenu, i, pitem):
53 msw = True if "wxMSW" in wx.PlatformInfo else False
54 self.context = context
55 self.modeIds = {}
56
57 sub = wx.Menu()
58
59 for mode in self.modes:
60 menuItem = self.addMode(rootMenu if msw else sub, mode)
61 sub.Append(menuItem)
62 menuItem.Check(self.currMode.item == mode.item)
63
64 return sub
65
66 def handleMode(self, event):
67 item = self.modeIds[event.Id]

Callers

nothing calls this directly

Calls 1

addModeMethod · 0.95

Tested by

no test coverage detected