| 37 | DAMAGE_TYPES = ("em", "thermal", "kinetic", "explosive") |
| 38 | |
| 39 | def __init__(self, parent): |
| 40 | super().__init__( |
| 41 | parent, id=wx.ID_ANY, title="Development Tools", resizeable=True, |
| 42 | size=wx.Size(400, 320) if "wxGTK" in wx.PlatformInfo else wx.Size(400, 240)) |
| 43 | self.mainFrame = parent |
| 44 | self.block = False |
| 45 | self.SetSizeHints(wx.DefaultSize, wx.DefaultSize) |
| 46 | |
| 47 | mainSizer = wx.BoxSizer(wx.VERTICAL) |
| 48 | |
| 49 | self.id_get = wx.TextCtrl(self, wx.ID_ANY, "", wx.DefaultPosition) |
| 50 | mainSizer.Add(self.id_get, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5) |
| 51 | self.idBtn = wx.Button(self, wx.ID_ANY, "Print object", wx.DefaultPosition, wx.DefaultSize, 0) |
| 52 | mainSizer.Add(self.idBtn, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5) |
| 53 | |
| 54 | self.idBtn.Bind(wx.EVT_BUTTON, self.objects_by_id) |
| 55 | |
| 56 | self.gcCollect = wx.Button(self, wx.ID_ANY, "GC Collect", wx.DefaultPosition, wx.DefaultSize, 0) |
| 57 | mainSizer.Add(self.gcCollect, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5) |
| 58 | |
| 59 | self.gcCollect.Bind(wx.EVT_BUTTON, self.gc_collect) |
| 60 | |
| 61 | self.fitTest = wx.Button(self, wx.ID_ANY, "Test fits", wx.DefaultPosition, wx.DefaultSize, 0) |
| 62 | mainSizer.Add(self.fitTest, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5) |
| 63 | |
| 64 | self.fitTest.Bind(wx.EVT_BUTTON, self.fit_test) |
| 65 | |
| 66 | self.cmdPrint = wx.Button(self, wx.ID_ANY, "Command Print", wx.DefaultPosition, wx.DefaultSize, 0) |
| 67 | mainSizer.Add(self.cmdPrint, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5) |
| 68 | |
| 69 | self.cmdPrint.Bind(wx.EVT_BUTTON, self.cmd_print) |
| 70 | |
| 71 | self.SetSizer(mainSizer) |
| 72 | |
| 73 | self.Layout() |
| 74 | self.CenterOnParent() |
| 75 | self.SetMinSize(self.GetSize()) |
| 76 | |
| 77 | def objects_by_id(self, evt): |
| 78 | input = self.id_get.GetValue() |