(self, context)
| 54 | event.Skip() |
| 55 | |
| 56 | def toggleContext(self, context): |
| 57 | # Apparently you cannot .Hide(True) on a Window, otherwise I would just .Hide(context !== x). |
| 58 | # This is a gimpy way to toggle this shit |
| 59 | for x in self.contexts: |
| 60 | bitmap = getattr(self, "bitmapFull{}Bay".format(x.capitalize())) |
| 61 | base = getattr(self, "baseFull{}Bay".format(x.capitalize())) |
| 62 | |
| 63 | if context == x: |
| 64 | bitmap.Show() |
| 65 | base.Show(True) |
| 66 | else: |
| 67 | bitmap.Hide() |
| 68 | base.Hide(True) |
| 69 | |
| 70 | fighter_sizer = getattr(self, "boxSizerFighter") |
| 71 | drone_sizer = getattr(self, "boxSizerDrones") |
| 72 | |
| 73 | if context != "fighter": |
| 74 | fighter_sizer.ShowItems(False) |
| 75 | drone_sizer.ShowItems(True) |
| 76 | else: |
| 77 | fighter_sizer.ShowItems(True) |
| 78 | drone_sizer.ShowItems(False) |
| 79 | |
| 80 | self.panel.Layout() |
| 81 | self.headerPanel.Layout() |
| 82 | |
| 83 | def getHeaderText(self, fit): |
| 84 | return _t("Resources") |
no test coverage detected