From 244a8a606a904aa50d62cc7cf36800f631d29d8a Mon Sep 17 00:00:00 2001 From: kl0wn <4371017+kl0wn@users.noreply.github.com> Date: Mon, 14 Oct 2019 21:30:40 -0500 Subject: [PATCH] Add dynamic Pause button --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index a2865cf..5398dea 100755 --- a/main.py +++ b/main.py @@ -355,6 +355,7 @@ def __init__(self, *args): self.settings.load() self.runButton.setText('Start') self.pauseButton.setText('Pause') + self.pauseButton.setEnabled(False) self.screenshotButton.setText('Screenshot') # Connect signals @@ -383,15 +384,17 @@ def onReadyReadStandardError(self): def onXqemuStateChanged(self): if self.inst.isRunning: self.runButton.setText('Stop') + self.pauseButton.setEnabled(True) else: self.runButton.setText('Start') + self.pauseButton.setEnabled(False) + self.pauseButton.setText('Pause') if self.inst._p.exitCode() != 0: QMessageBox.critical(self, 'XQEMU quit prematurely!', 'XQEMU quit prematurely.\n\n' 'This may be a known issue with this specific game, a problem in XQEMU, or an error in your settings.\n' 'Please check your settings for correctness and see the log area for details.\n' 'If you need help resolving this problem, make sure to include this log in your error report, ' 'along with as many details about how and what you were doing when the error happened.') - self.pauseButton.setText('Pause') def onRunButtonClicked(self): if not self.inst.isRunning: