Merge pull request #4166 from VolcaEM/quickstart-faq
Add "Open Quickstart Guide" and "FAQ" buttons to the Help menu
This commit is contained in:
commit
f1b1238e2d
|
@ -868,6 +868,9 @@ void GMainWindow::ConnectMenuEvents() {
|
||||||
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_Open_Mods_Page, &QAction::triggered, this, &GMainWindow::OnOpenModsPage);
|
||||||
|
connect(ui.action_Open_Quickstart_Guide, &QAction::triggered, this,
|
||||||
|
&GMainWindow::OnOpenQuickstartGuide);
|
||||||
|
connect(ui.action_Open_FAQ, &QAction::triggered, this, &GMainWindow::OnOpenFAQ);
|
||||||
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);
|
||||||
|
|
||||||
|
@ -1839,16 +1842,26 @@ void GMainWindow::OnMenuReportCompatibility() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnOpenModsPage() {
|
void GMainWindow::OpenURL(const QUrl& url) {
|
||||||
const auto mods_page_url = QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods");
|
const bool open = QDesktopServices::openUrl(url);
|
||||||
const QUrl mods_page(mods_page_url);
|
|
||||||
const bool open = QDesktopServices::openUrl(mods_page);
|
|
||||||
if (!open) {
|
if (!open) {
|
||||||
QMessageBox::warning(this, tr("Error opening URL"),
|
QMessageBox::warning(this, tr("Error opening URL"),
|
||||||
tr("Unable to open the URL \"%1\".").arg(mods_page_url));
|
tr("Unable to open the URL \"%1\".").arg(url.toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GMainWindow::OnOpenModsPage() {
|
||||||
|
OpenURL(QUrl(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods")));
|
||||||
|
}
|
||||||
|
|
||||||
|
void GMainWindow::OnOpenQuickstartGuide() {
|
||||||
|
OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/")));
|
||||||
|
}
|
||||||
|
|
||||||
|
void GMainWindow::OnOpenFAQ() {
|
||||||
|
OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/wiki/faq/")));
|
||||||
|
}
|
||||||
|
|
||||||
void GMainWindow::ToggleFullscreen() {
|
void GMainWindow::ToggleFullscreen() {
|
||||||
if (!emulation_running) {
|
if (!emulation_running) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -182,6 +182,8 @@ private slots:
|
||||||
void OnStopGame();
|
void OnStopGame();
|
||||||
void OnMenuReportCompatibility();
|
void OnMenuReportCompatibility();
|
||||||
void OnOpenModsPage();
|
void OnOpenModsPage();
|
||||||
|
void OnOpenQuickstartGuide();
|
||||||
|
void OnOpenFAQ();
|
||||||
/// 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);
|
||||||
|
@ -220,6 +222,7 @@ private:
|
||||||
void UpdateStatusBar();
|
void UpdateStatusBar();
|
||||||
void HideMouseCursor();
|
void HideMouseCursor();
|
||||||
void ShowMouseCursor();
|
void ShowMouseCursor();
|
||||||
|
void OpenURL(const QUrl& url);
|
||||||
|
|
||||||
Ui::MainWindow ui;
|
Ui::MainWindow ui;
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,8 @@
|
||||||
</property>
|
</property>
|
||||||
<addaction name="action_Report_Compatibility"/>
|
<addaction name="action_Report_Compatibility"/>
|
||||||
<addaction name="action_Open_Mods_Page"/>
|
<addaction name="action_Open_Mods_Page"/>
|
||||||
|
<addaction name="action_Open_Quickstart_Guide"/>
|
||||||
|
<addaction name="action_Open_FAQ"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="action_About"/>
|
<addaction name="action_About"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -262,6 +264,16 @@
|
||||||
<string>Open Mods Page</string>
|
<string>Open Mods Page</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_Open_Quickstart_Guide">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open Quickstart Guide</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="action_Open_FAQ">
|
||||||
|
<property name="text">
|
||||||
|
<string>FAQ</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>
|
||||||
|
|
Reference in New Issue