def open(self, event):
dialog = wx.DirDialog(self, 'Select a Turrican II CDTV directory', '', wx.DD_DEFAULT_STYLE | wx.DD_DIR_MUST_EXIST)
if dialog.ShowModal() != wx.ID_OK:
return
directory = dialog.GetPath()
test_files = ['L1-1', 'L2-1', 'L3-1', 'L4-1', 'L5-1', 'LOADER', 'MAIN']
for filename in test_files:
if not os.path.exists(os.path.join(directory, filename)):
wx.MessageBox('Not a valid Turrican II CDTV directory.', 'Invalid directory', wx.OK | wx.ICON_EXCLAMATION)
return
self._game_dir = directory
self._graphics = Graphics(self._game_dir)
self.load_worlds()
self.Entities.set_graphics(self._graphics)
self.Entities.set_font(self._font)
self.LevelSelect.SetSelection(0)
self.select_level(0, 0)
self.update_menu_state()
self.update_title()
评论列表
文章目录