(self, fittingView, params=None)
| 36 | name = "Drone HP" |
| 37 | |
| 38 | def __init__(self, fittingView, params=None): |
| 39 | self.mainFrame = gui.mainFrame.MainFrame.getInstance() |
| 40 | if params is None: |
| 41 | params = {"showIcon": True, "displayName": False} |
| 42 | |
| 43 | ViewColumn.__init__(self, fittingView) |
| 44 | |
| 45 | sAttr = Attribute.getInstance() |
| 46 | info = sAttr.getAttributeInfo("shieldCapacity") |
| 47 | self.info = info |
| 48 | if params["showIcon"]: |
| 49 | iconFile = info.iconID |
| 50 | if iconFile: |
| 51 | self.imageId = fittingView.imageList.GetImageIndex(iconFile, "icons") |
| 52 | self.bitmap = BitmapLoader.getBitmap(iconFile, "icons") |
| 53 | else: |
| 54 | self.imageId = -1 |
| 55 | self.mask = wx.LIST_MASK_IMAGE |
| 56 | else: |
| 57 | self.imageId = -1 |
| 58 | |
| 59 | if params["displayName"] or self.imageId == -1: |
| 60 | self.columnText = info.displayName if info.displayName != "" else info.name |
| 61 | self.mask |= wx.LIST_MASK_TEXT |
| 62 | |
| 63 | def getText(self, stuff): |
| 64 | if not isinstance(stuff, (Drone, Fighter)): |
nothing calls this directly
no test coverage detected