diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2022-05-02 17:02:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-02 17:02:48 +0200 |
| commit | 7a4cdc8f810dc1ae49e9b53e4641f1419f5d66c5 (patch) | |
| tree | c3b6663e15673a48edb420797be6e05d0845600b /src | |
| parent | 8e0970235b5986268dd8e2b5c222c738874013b4 (diff) | |
| parent | eb7f5bb5d1d40e70934d201a4e25d9b98b0d3384 (diff) | |
Merge pull request #1636 from LostDragonist/supporturl
Add wiki linkage for games
Diffstat (limited to 'src')
| -rw-r--r-- | src/mainwindow.cpp | 20 | ||||
| -rw-r--r-- | src/mainwindow.h | 1 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 30148158..551f4494 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1044,6 +1044,12 @@ void MainWindow::createHelpMenu() connect(wikiAction, SIGNAL(triggered()), this, SLOT(wikiTriggered())); menu->addAction(wikiAction); + if(!m_OrganizerCore.managedGame()->getSupportURL().isEmpty()) { + QAction *gameSupportAction = new QAction(tr("Game Support Wiki"), menu); + connect(gameSupportAction, SIGNAL(triggered()), this, SLOT(gameSupportTriggered())); + menu->addAction(gameSupportAction); + } + QAction *discordAction = new QAction(tr("Chat on Discord"), menu); connect(discordAction, SIGNAL(triggered()), this, SLOT(discordTriggered())); menu->addAction(discordAction); @@ -1148,7 +1154,7 @@ bool MainWindow::shouldStartTutorial() const QMessageBox::Question, tr("Show tutorial?"), tr("You are starting Mod Organizer for the first time. " "Do you want to show a tutorial of its basic features? If you choose " - "no you can always start the tutorial from the \"Help\"-menu."), + "no you can always start the tutorial from the \"Help\" menu."), QMessageBox::Yes | QMessageBox::No); dlg.setCheckBox(new QCheckBox(tr("Never ask to show tutorials"))); @@ -1200,6 +1206,13 @@ void MainWindow::showEvent(QShowEvent *event) QObject::tr("Please use \"Help\" from the toolbar to get usage instructions to all elements")); } + if (!m_OrganizerCore.managedGame()->getSupportURL().isEmpty()) { + QMessageBox::information(this, tr("Game Support Wiki"), + tr("Do you know how to mod this game? Do you need to learn? There's a game support wiki available! " + "Click OK to open the wiki. In the future, you can access this link from the \"Help\" menu."), QMessageBox::Ok); + gameSupportTriggered(); + } + m_OrganizerCore.settings().setFirstStart(false); } @@ -2164,6 +2177,11 @@ void MainWindow::wikiTriggered() shell::Open(QUrl("https://modorganizer2.github.io/")); } +void MainWindow::gameSupportTriggered() +{ + shell::Open(QUrl(m_OrganizerCore.managedGame()->getSupportURL())); +} + void MainWindow::discordTriggered() { shell::Open(QUrl("https://discord.gg/6GKR9jZ")); diff --git a/src/mainwindow.h b/src/mainwindow.h index 3b32b229..d08fdb0e 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -314,6 +314,7 @@ private slots: void helpTriggered(); void issueTriggered(); void wikiTriggered(); + void gameSupportTriggered(); void discordTriggered(); void tutorialTriggered(); void extractBSATriggered(QTreeWidgetItem* item); |
