Added AchievementsWindow QDialog

AchievementsWindow is the dialog box that will eventually contain the settings and progress data for RetroAchievements on Dolphin. This adds the barebones dialog, and connects it to MainWindow's MenuBar.
This commit is contained in:
LillyJadeKatrin
2023-05-26 09:35:50 -04:00
parent da77084d2f
commit e1e662b86a
8 changed files with 120 additions and 0 deletions

View File

@ -72,6 +72,7 @@
#include "DiscIO/RiivolutionPatcher.h"
#include "DolphinQt/AboutDialog.h"
#include "DolphinQt/Achievements/AchievementsWindow.h"
#include "DolphinQt/CheatsManager.h"
#include "DolphinQt/Config/ControllersWindow.h"
#include "DolphinQt/Config/FreeLookWindow.h"
@ -544,6 +545,10 @@ void MainWindow::ConnectMenuBar()
connect(m_menu_bar, &MenuBar::ShowInfinityBase, this, &MainWindow::ShowInfinityBase);
connect(m_menu_bar, &MenuBar::ConnectWiiRemote, this, &MainWindow::OnConnectWiiRemote);
#ifdef USE_RETRO_ACHIEVEMENTS
connect(m_menu_bar, &MenuBar::ShowAchievementsWindow, this, &MainWindow::ShowAchievementsWindow);
#endif // USE_RETRO_ACHIEVEMENTS
// Movie
connect(m_menu_bar, &MenuBar::PlayRecording, this, &MainWindow::OnPlayRecording);
connect(m_menu_bar, &MenuBar::StartRecording, this, &MainWindow::OnStartRecording);
@ -1892,6 +1897,20 @@ void MainWindow::OnConnectWiiRemote(int id)
});
}
#ifdef USE_RETRO_ACHIEVEMENTS
void MainWindow::ShowAchievementsWindow()
{
if (!m_achievements_window)
{
m_achievements_window = new AchievementsWindow(this);
}
m_achievements_window->show();
m_achievements_window->raise();
m_achievements_window->activateWindow();
}
#endif // USE_RETRO_ACHIEVEMENTS
void MainWindow::ShowMemcardManager()
{
GCMemcardManager manager(this);