mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-15 18:40:00 +00:00
Qt: add option to add games to the main menu
This commit is contained in:
parent
586c0ea1d0
commit
1cf62e9ded
@ -1163,6 +1163,22 @@ void main_window::CreateConnects()
|
||||
connect(ui->bootGameAct, &QAction::triggered, this, &main_window::BootGame);
|
||||
connect(ui->actionopen_rsx_capture, &QAction::triggered, [this](){ BootRsxCapture(); });
|
||||
|
||||
connect(ui->addGamesAct, &QAction::triggered, [this]() {
|
||||
QStringList paths;
|
||||
|
||||
// Only select one folder for now
|
||||
paths << QFileDialog::getExistingDirectory(this, tr("Select a folder containing one or more games"), qstr(fs::get_config_dir()), QFileDialog::ShowDirsOnly);
|
||||
|
||||
if (!paths.isEmpty())
|
||||
{
|
||||
for (const QString& path : paths)
|
||||
{
|
||||
AddGamesFromDir(path);
|
||||
}
|
||||
m_gameListFrame->Refresh(true);
|
||||
}
|
||||
});
|
||||
|
||||
connect(ui->bootRecentMenu, &QMenu::aboutToShow, [=]
|
||||
{
|
||||
// Enable/Disable Recent Games List
|
||||
|
@ -169,6 +169,8 @@
|
||||
<addaction name="bootGameAct"/>
|
||||
<addaction name="bootRecentMenu"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="addGamesAct"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="bootInstallPkgAct"/>
|
||||
<addaction name="bootInstallPupAct"/>
|
||||
<addaction name="separator"/>
|
||||
@ -913,6 +915,11 @@
|
||||
<string>Open RSX Capture</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="addGamesAct">
|
||||
<property name="text">
|
||||
<string>Add Games</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user