diff options
| author | 2020-06-30 19:03:47 -0400 | |
|---|---|---|
| committer | 2020-06-30 19:03:47 -0400 | |
| commit | f1b1238e2df7b4b845f19d83262e89f10f0dcb38 (patch) | |
| tree | e6c13f2ce1512571857868a9265bc62b57f7be56 | |
| parent | Merge pull request #4176 from ReinUsesLisp/compatible-formats (diff) | |
| parent | Update FAQ function name (2/2) (diff) | |
| download | yuzu-f1b1238e2df7b4b845f19d83262e89f10f0dcb38.tar.gz yuzu-f1b1238e2df7b4b845f19d83262e89f10f0dcb38.tar.xz yuzu-f1b1238e2df7b4b845f19d83262e89f10f0dcb38.zip | |
Merge pull request #4166 from VolcaEM/quickstart-faq
Add "Open Quickstart Guide" and "FAQ" buttons to the Help menu
| -rw-r--r-- | src/yuzu/main.cpp | 23 | ||||
| -rw-r--r-- | src/yuzu/main.h | 3 | ||||
| -rw-r--r-- | src/yuzu/main.ui | 12 |
3 files changed, 33 insertions, 5 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 880a6a06e..f65cc20b4 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -868,6 +868,9 @@ void GMainWindow::ConnectMenuEvents() { | |||
| 868 | connect(ui.action_Report_Compatibility, &QAction::triggered, this, | 868 | connect(ui.action_Report_Compatibility, &QAction::triggered, this, |
| 869 | &GMainWindow::OnMenuReportCompatibility); | 869 | &GMainWindow::OnMenuReportCompatibility); |
| 870 | connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); | 870 | connect(ui.action_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage); |
| 871 | connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this, | ||
| 872 | &GMainWindow::OnOpenQuickstartGuide); | ||
| 873 | connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnOpenFAQ); | ||
| 871 | connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); | 874 | connect(ui.action_Restart, &QAction::triggered, this, [this] { BootGame(QString(game_path)); }); |
| 872 | connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); | 875 | connect(ui.action_Configure, &QAction::triggered, this, &GMainWindow::OnConfigure); |
| 873 | 876 | ||
| @@ -1839,16 +1842,26 @@ void GMainWindow::OnMenuReportCompatibility() { | |||
| 1839 | } | 1842 | } |
| 1840 | } | 1843 | } |
| 1841 | 1844 | ||
| 1842 | void GMainWindow::OnOpenModsPage() { | 1845 | void GMainWindow::OpenURL(const QUrl& url) { |
| 1843 | const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"); | 1846 | const bool open = QDesktopServices::openUrl(url); |
| 1844 | const QUrl mods_page(mods_page_url); | ||
| 1845 | const bool open = QDesktopServices::openUrl(mods_page); | ||
| 1846 | if (!open) { | 1847 | if (!open) { |
| 1847 | QMessageBox::warning(this, tr("Error opening URL"), | 1848 | QMessageBox::warning(this, tr("Error opening URL"), |
| 1848 | tr("Unable to open the URL \"%1\".").arg(mods_page_url)); | 1849 | tr("Unable to open the URL \"%1\".").arg(url.toString())); |
| 1849 | } | 1850 | } |
| 1850 | } | 1851 | } |
| 1851 | 1852 | ||
| 1853 | void GMainWindow::OnOpenModsPage() { | ||
| 1854 | OpenURL(QUrl(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"))); | ||
| 1855 | } | ||
| 1856 | |||
| 1857 | void GMainWindow::OnOpenQuickstartGuide() { | ||
| 1858 | OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/"))); | ||
| 1859 | } | ||
| 1860 | |||
| 1861 | void GMainWindow::OnOpenFAQ() { | ||
| 1862 | OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/wiki/faq/"))); | ||
| 1863 | } | ||
| 1864 | |||
| 1852 | void GMainWindow::ToggleFullscreen() { | 1865 | void GMainWindow::ToggleFullscreen() { |
| 1853 | if (!emulation_running) { | 1866 | if (!emulation_running) { |
| 1854 | return; | 1867 | return; |
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 5581874ed..a48d6436b 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -182,6 +182,8 @@ private slots: | |||
| 182 | void OnStopGame(); | 182 | void OnStopGame(); |
| 183 | void OnMenuReportCompatibility(); | 183 | void OnMenuReportCompatibility(); |
| 184 | void OnOpenModsPage(); | 184 | void OnOpenModsPage(); |
| 185 | void OnOpenQuickstartGuide(); | ||
| 186 | void OnOpenFAQ(); | ||
| 185 | /// Called whenever a user selects a game in the game list widget. | 187 | /// Called whenever a user selects a game in the game list widget. |
| 186 | void OnGameListLoadFile(QString game_path); | 188 | void OnGameListLoadFile(QString game_path); |
| 187 | void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path); | 189 | void OnGameListOpenFolder(GameListOpenTarget target, const std::string& game_path); |
| @@ -220,6 +222,7 @@ private: | |||
| 220 | void UpdateStatusBar(); | 222 | void UpdateStatusBar(); |
| 221 | void HideMouseCursor(); | 223 | void HideMouseCursor(); |
| 222 | void ShowMouseCursor(); | 224 | void ShowMouseCursor(); |
| 225 | void OpenURL(const QUrl& url); | ||
| 223 | 226 | ||
| 224 | Ui::MainWindow ui; | 227 | Ui::MainWindow ui; |
| 225 | 228 | ||
diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index b5745dfd5..bee6e107e 100644 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui | |||
| @@ -114,6 +114,8 @@ | |||
| 114 | </property> | 114 | </property> |
| 115 | <addaction name="action_Report_Compatibility"/> | 115 | <addaction name="action_Report_Compatibility"/> |
| 116 | <addaction name="action_Open_Mods_Page"/> | 116 | <addaction name="action_Open_Mods_Page"/> |
| 117 | <addaction name="action_Open_Quickstart_Guide"/> | ||
| 118 | <addaction name="action_Open_FAQ"/> | ||
| 117 | <addaction name="separator"/> | 119 | <addaction name="separator"/> |
| 118 | <addaction name="action_About"/> | 120 | <addaction name="action_About"/> |
| 119 | </widget> | 121 | </widget> |
| @@ -262,6 +264,16 @@ | |||
| 262 | <string>Open Mods Page</string> | 264 | <string>Open Mods Page</string> |
| 263 | </property> | 265 | </property> |
| 264 | </action> | 266 | </action> |
| 267 | <action name="action_Open_Quickstart_Guide"> | ||
| 268 | <property name="text"> | ||
| 269 | <string>Open Quickstart Guide</string> | ||
| 270 | </property> | ||
| 271 | </action> | ||
| 272 | <action name="action_Open_FAQ"> | ||
| 273 | <property name="text"> | ||
| 274 | <string>FAQ</string> | ||
| 275 | </property> | ||
| 276 | </action> | ||
| 265 | <action name="action_Open_yuzu_Folder"> | 277 | <action name="action_Open_yuzu_Folder"> |
| 266 | <property name="text"> | 278 | <property name="text"> |
| 267 | <string>Open yuzu Folder</string> | 279 | <string>Open yuzu Folder</string> |