Files
pyfa/gui/builtinContextMenus/implantSetSave.py
2019-12-16 13:59:41 +03:00

26 lines
720 B
Python

from gui.contextMenu import ContextMenuUnconditional
class ImplantSetSave(ContextMenuUnconditional):
def display(self, callingWindow, srcContext):
if not hasattr(callingWindow, 'implants'):
return False
implantList = callingWindow.implants
if not implantList or len(implantList) == 0:
return False
return srcContext in ("implantItemMisc", "implantItemMiscChar")
def getText(self, callingWindow, context):
return "Save as New Implant Set"
def activate(self, callingWindow, fullContext, i):
implantList = callingWindow.implants
callingWindow.mainFrame.OnShowImplantSetEditor(None, implantList)
ImplantSetSave.register()