Skip to content

Commit

Permalink
Add dynamic Pause button
Browse files Browse the repository at this point in the history
  • Loading branch information
Libbers authored and mborgerson committed Jan 2, 2020
1 parent e4ca7bd commit 244a8a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 244a8a6

Please sign in to comment.