(self, contentPanel, headerPanel)
| 47 | return width |
| 48 | |
| 49 | def populatePanel(self, contentPanel, headerPanel): |
| 50 | contentSizer = contentPanel.GetSizer() |
| 51 | self.panel = contentPanel |
| 52 | |
| 53 | self.headerPanel = headerPanel |
| 54 | |
| 55 | # Display table |
| 56 | sizerBombing = wx.FlexGridSizer(7, 5, 0, 0) |
| 57 | for i in range(4): |
| 58 | sizerBombing.AddGrowableCol(i + 1) |
| 59 | contentSizer.Add(sizerBombing, 0, wx.EXPAND, 0) |
| 60 | |
| 61 | # first row is for icons |
| 62 | bitmap = BitmapLoader.getStaticBitmap("skill_big", contentPanel, "gui") |
| 63 | tooltip = wx.ToolTip(_t("Covert Ops level")) |
| 64 | bitmap.SetToolTip(tooltip) |
| 65 | sizerBombing.Add(bitmap, 0, wx.ALIGN_CENTER) |
| 66 | toolTipText = { |
| 67 | "em": _t("Electron Bomb"), |
| 68 | "thermal": _t("Scorch Bomb"), |
| 69 | "kinetic": _t("Concussion Bomb"), |
| 70 | "explosive": _t("Shrapnel Bomb") |
| 71 | } |
| 72 | for damageType in ("em", "thermal", "kinetic", "explosive"): |
| 73 | bitmap = BitmapLoader.getStaticBitmap("%s_big" % damageType, contentPanel, "gui") |
| 74 | tooltip = wx.ToolTip(toolTipText[damageType]) |
| 75 | bitmap.SetToolTip(tooltip) |
| 76 | sizerBombing.Add(bitmap, 0, wx.ALIGN_CENTER) |
| 77 | |
| 78 | # the other rows are for each possible level of Covert Ops skill |
| 79 | for covertLevel in ("0", "1", "2", "3", "4", "5"): |
| 80 | label = wx.StaticText(contentPanel, wx.ID_ANY, "%s" % covertLevel) |
| 81 | tooltip = wx.ToolTip(_t("Covert Ops level")) |
| 82 | label.SetToolTip(tooltip) |
| 83 | sizerBombing.Add(label, 0, wx.ALIGN_CENTER) |
| 84 | |
| 85 | for damageType in ("em", "thermal", "kinetic", "explosive"): |
| 86 | label = wx.StaticText(contentPanel, wx.ID_ANY, "0.0") |
| 87 | setattr(self, "labelDamagetypeCovertlevel%s%s" % (damageType.capitalize(), covertLevel), label) |
| 88 | sizerBombing.Add(label, 0, wx.ALIGN_CENTER) |
| 89 | |
| 90 | def refreshPanel(self, fit): |
| 91 | # If we did anything interesting, we'd update our labels to reflect the new fit's stats here |
nothing calls this directly
no test coverage detected