mirror of
https://github.com/shadps4-emu/shadps4-qtlauncher.git
synced 2026-01-31 01:05:16 +01:00
Reshow the play button after game close (#238)
* Add call to update UI after game close * instead of regenerating the header entirely, just swap the play/pause buttons * fix uninitialized var,
This commit is contained in:
@@ -144,6 +144,19 @@ void MainWindow::onGameClosed() {
|
||||
EmulatorState::GetInstance()->SetGameRunning(false);
|
||||
is_paused = false;
|
||||
|
||||
// swap the pause button back to the play button on close
|
||||
ui->playButton->setVisible(true);
|
||||
ui->pauseButton->setVisible(false);
|
||||
if (ui->toggleLabelsAct->isChecked()) {
|
||||
QLabel* playButtonLabel = ui->playButton->parentWidget()->findChild<QLabel*>();
|
||||
if (playButtonLabel)
|
||||
playButtonLabel->setVisible(true);
|
||||
|
||||
QLabel* pauseButtonLabel = ui->pauseButton->parentWidget()->findChild<QLabel*>();
|
||||
if (pauseButtonLabel)
|
||||
pauseButtonLabel->setVisible(false);
|
||||
}
|
||||
|
||||
// clear dialogs when game closed
|
||||
skylander_dialog* sky_diag = skylander_dialog::get_dlg(this, m_ipc_client);
|
||||
sky_diag->clear_all();
|
||||
|
||||
Reference in New Issue
Block a user