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

Method UpdateElementsPos

gui/builtinShipBrowser/categoryItem.py:85–97  ·  view source on GitHub ↗
(self, mdc)

Source from the content-addressed store, hash-verified

83 self.selectCategory(event)
84
85 def UpdateElementsPos(self, mdc):
86 rect = self.GetRect()
87 self.shipBmpx = self.padding
88 self.shipBmpy = (rect.height - self.shipBmp.GetWidth()) / 2
89
90 self.shipBmpx -= self.animCount
91
92 mdc.SetFont(self.fontBig)
93 categoryName, fittings = self.fittingInfo
94 wtext, htext = mdc.GetTextExtent(categoryName)
95
96 self.catx = self.shipBmpx + self.shipBmp.GetWidth() + self.padding
97 self.caty = (rect.height - htext) / 2
98
99 def DrawItem(self, mdc):
100 # rect = self.GetRect()

Callers 1

DrawItemMethod · 0.95

Calls 1

GetWidthMethod · 0.45

Tested by

no test coverage detected