| 191 | wx.PostEvent(self.mainFrame, FitSelected(fitID=fitID)) |
| 192 | |
| 193 | def UpdateElementsPos(self, mdc): |
| 194 | rect = self.GetRect() |
| 195 | |
| 196 | self.toolbarx = rect.width - self.toolbar.GetWidth() - self.padding |
| 197 | self.toolbary = (rect.height - self.toolbar.GetHeight()) / 2 |
| 198 | |
| 199 | self.toolbarx += self.animCount |
| 200 | |
| 201 | self.shipEffx = self.padding + (rect.height - self.shipEffBk.GetWidth()) / 2 |
| 202 | self.shipEffy = (rect.height - self.shipEffBk.GetHeight()) / 2 |
| 203 | |
| 204 | self.shipEffx -= self.animCount |
| 205 | |
| 206 | self.shipBmpx = self.padding + (rect.height - self.shipBmp.GetWidth()) / 2 |
| 207 | self.shipBmpy = (rect.height - self.shipBmp.GetHeight()) / 2 |
| 208 | |
| 209 | self.shipBmpx -= self.animCount |
| 210 | |
| 211 | self.raceBmpx = self.shipEffx + self.shipEffBk.GetWidth() + self.padding |
| 212 | self.raceBmpy = (rect.height - self.raceBmp.GetHeight()) / 2 |
| 213 | |
| 214 | self.textStartx = self.raceBmpx + self.raceBmp.GetWidth() + self.padding |
| 215 | |
| 216 | self.shipNamey = (rect.height - self.shipBmp.GetHeight()) / 2 |
| 217 | |
| 218 | shipName, shipTrait, fittings = self.shipFittingInfo |
| 219 | |
| 220 | mdc.SetFont(self.fontBig) |
| 221 | wtext, htext = mdc.GetTextExtent(shipName) |
| 222 | |
| 223 | self.fittingsy = self.shipNamey + htext |
| 224 | |
| 225 | mdc.SetFont(self.fontSmall) |
| 226 | |
| 227 | wlabel, hlabel = mdc.GetTextExtent(self.toolbar.hoverLabel) |
| 228 | |
| 229 | self.thoverx = self.toolbarx - self.padding - wlabel |
| 230 | self.thovery = (rect.height - hlabel) / 2 |
| 231 | self.thoverw = wlabel |
| 232 | |
| 233 | def DrawItem(self, mdc): |
| 234 | # rect = self.GetRect() |