mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Merge pull request #4136 from VolcaEM/mods
Add a "Open Mods Page" button to the GUI
This commit is contained in:
commit
a980b4cbc1
3 changed files with 19 additions and 0 deletions
|
@ -56,6 +56,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
#include <QSysInfo>
|
#include <QSysInfo>
|
||||||
|
#include <QUrl>
|
||||||
#include <QtConcurrent/QtConcurrent>
|
#include <QtConcurrent/QtConcurrent>
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
@ -836,6 +837,7 @@ void GMainWindow::ConnectMenuEvents() {
|
||||||
connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame);
|
connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame);
|
||||||
connect(ui.action_Report_Compatibility, &QAction::triggered, this,
|
connect(ui.action_Report_Compatibility, &QAction::triggered, this,
|
||||||
&GMainWindow::OnMenuReportCompatibility);
|
&GMainWindow::OnMenuReportCompatibility);
|
||||||
|
connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage);
|
||||||
connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); });
|
connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); });
|
||||||
connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure);
|
connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure);
|
||||||
|
|
||||||
|
@ -1807,6 +1809,16 @@ void GMainWindow::OnMenuReportCompatibility() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GMainWindow::OnOpenModsPage() {
|
||||||
|
const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods");
|
||||||
|
const QUrl mods_page(mods_page_url);
|
||||||
|
const bool open = QDesktopServices::openUrl(mods_page);
|
||||||
|
if (!open) {
|
||||||
|
QMessageBox::warning(this, tr("Error opening URL"),
|
||||||
|
tr("Unable to open the URL \"%1\".").arg(mods_page_url));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GMainWindow::ToggleFullscreen() {
|
void GMainWindow::ToggleFullscreen() {
|
||||||
if (!emulation_running) {
|
if (!emulation_running) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -181,6 +181,7 @@ private slots:
|
||||||
void OnPauseGame();
|
void OnPauseGame();
|
||||||
void OnStopGame();
|
void OnStopGame();
|
||||||
void OnMenuReportCompatibility();
|
void OnMenuReportCompatibility();
|
||||||
|
void OnOpenModsPage();
|
||||||
/// Called whenever a user selects a game in the game list widget.
|
/// Called whenever a user selects a game in the game list widget.
|
||||||
void OnGameListLoadFile(QString game_path);
|
void OnGameListLoadFile(QString game_path);
|
||||||
void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path);
|
void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path);
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
<string>&Help</string>
|
<string>&Help</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="action_Report_Compatibility"/>
|
<addaction name="action_Report_Compatibility"/>
|
||||||
|
<addaction name="action_Open_Mods_Page"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="action_About"/>
|
<addaction name="action_About"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -256,6 +257,11 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_Open_Mods_Page">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Mods Page</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
<action name="action_Open_yuzu_Folder">
|
<action name="action_Open_yuzu_Folder">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Open yuzu Folder</string>
|
<string>Open yuzu Folder</string>
|
||||||
|
|
Loading…
Reference in a new issue