def delgame(self, name): reply = QMessageBox.warning(self, "删除", "确定删除?", QMessageBox.Yes | QMessageBox.No, QMessageBox.No) if reply == QMessageBox.Yes: Game.del_game(name) self.set_lw_gamelist()
def on_pb_reinstall_forge_clicked(self): Game.install_forge(self.name, self.config['version'], self.config['forge_version'])
def on_pb_download_clicked(self, _): name = self.le_name.text() iter = Game.download_version(name, self.download_content['version'], self.download_content['forge']) g.dmr.add_task(f'下载{name}', iter)
def set_cb_liteloader(self): version = self.cb_version.currentText() self.cb_liteloader.clear() self.cb_liteloader.addItem('') for i in Game.get_liteloader(version): self.cb_liteloader.addItem(i)
def set_cb_optifine(self): version = self.cb_version.currentText() self.cb_optifine.clear() self.cb_optifine.addItem('') for i in Game.get_optifine(version): self.cb_optifine.addItem(i)
def set_cb_version(self): self.cb_version.clear() self.cb_version.addItem('') for i in Game.get_versions(): self.cb_version.addItem(i)