MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / spawnMenu

Method spawnMenu

gui/builtinAdditionPanes/fighterView.py:381–398  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

379 event.Skip()
380
381 def spawnMenu(self, event):
382 clickedPos = self.getRowByAbs(event.Position)
383 self.ensureSelection(clickedPos)
384
385 selection = self.getSelectedFighters()
386 mainFighter = None
387 if clickedPos != -1:
388 try:
389 fighter = self.fighters[clickedPos]
390 except IndexError:
391 pass
392 else:
393 if fighter in self.original:
394 mainFighter = fighter
395 itemContext = None if mainFighter is None else Market.getInstance().getCategoryByItem(mainFighter.item).displayName
396 menu = ContextMenu.getMenu(self, mainFighter, selection, ("fighterItem", itemContext), ("fighterItemMisc", itemContext))
397 if menu:
398 self.PopupMenu(menu)
399
400 def getSelectedFighters(self):
401 fighters = []

Callers

nothing calls this directly

Calls 6

getSelectedFightersMethod · 0.95
getRowByAbsMethod · 0.80
ensureSelectionMethod · 0.80
getCategoryByItemMethod · 0.80
getMenuMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected