diff options
author | VolcaEM <63682805+VolcaEM@users.noreply.github.com> | 2020-06-21 06:09:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-21 06:09:28 +0200 |
commit | b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f (patch) | |
tree | 2fe0998ee58277079101d53c2dd38bdbf5c72e18 /src | |
parent | Merge pull request #3982 from ReinUsesLisp/membar-cts (diff) | |
download | yuzu-b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f.tar yuzu-b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f.tar.gz yuzu-b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f.tar.bz2 yuzu-b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f.tar.lz yuzu-b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f.tar.xz yuzu-b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f.tar.zst yuzu-b81af6ae9bdbf7edcdc6c1ec4f68d5e29ad18c5f.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/main.cpp | 13 | ||||
-rw-r--r-- | src/yuzu/main.h | 1 | ||||
-rw-r--r-- | src/yuzu/main.ui | 6 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 270cccc77..826f8903b 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -57,6 +57,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include <QStatusBar> #include <QSysInfo> #include <QtConcurrent/QtConcurrent> +#include <QUrl> #include <fmt/format.h> #include "common/common_paths.h" @@ -826,6 +827,7 @@ void GMainWindow::ConnectMenuEvents() { connect(ui.action_Stop, &QAction::triggered, this, &GMainWindow::OnStopGame); connect(ui.action_Report_Compatibility, &QAction::triggered, this, &GMainWindow::OnMenuReportCompatibility); + connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnSwitchModsPage); connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); @@ -1797,6 +1799,17 @@ void GMainWindow::OnMenuReportCompatibility() { } } +void GMainWindow::OnSwitchModsPage() { + const std::string mods_page_url = "https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"; + const QString mods_page_url_qs = QString::fromStdString(mods_page_url); + const QUrl mods_page(mods_page_url_qs); + 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_qs)); + } +} + void GMainWindow::ToggleFullscreen() { if (!emulation_running) { return; diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 4f4c8ddbe..7d9910608 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -181,6 +181,7 @@ private slots: void OnPauseGame(); void OnStopGame(); void OnMenuReportCompatibility(); + void OnSwitchModsPage(); /// Called whenever a user selects a game in the game list widget. void OnGameListLoadFile(QString game_path); void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path); diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index 97c90f50b..b5745dfd5 100644 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -113,6 +113,7 @@ <string>&Help</string> </property> <addaction name="action_Report_Compatibility"/> + <addaction name="action_Open_Mods_Page"/> <addaction name="separator"/> <addaction name="action_About"/> </widget> @@ -256,6 +257,11 @@ <bool>false</bool> </property> </action> + <action name="action_Open_Mods_Page"> + <property name="text"> + <string>Open Mods Page</string> + </property> + </action> <action name="action_Open_yuzu_Folder"> <property name="text"> <string>Open yuzu Folder</string> |