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

Method getSubMenu

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

Source from the content-addressed store, hash-verified

41 return menuItem
42
43 def getSubMenu(self, callingWindow, context, mainItem, selection, rootMenu, i, pitem):
44 msw = True if "wxMSW" in wx.PlatformInfo else False
45 self.context = context
46 self.abilityIds = {}
47
48 sub = wx.Menu()
49
50 for ability in self.fighter.abilities:
51 if not ability.effect.isImplemented:
52 continue
53 menuItem = self.addAbility(rootMenu if msw else sub, ability)
54 sub.Append(menuItem)
55 menuItem.Check(ability.active)
56
57 return sub
58
59 def handleMode(self, event):
60 ability = self.abilityIds[event.Id]

Callers

nothing calls this directly

Calls 1

addAbilityMethod · 0.95

Tested by

no test coverage detected