Merge pull request #221 from flowln/install_button

This commit is contained in:
Sefa Eyeoglu 2022-03-05 20:43:44 +01:00 committed by GitHub
commit 53468ea474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -143,11 +143,19 @@ ModFolderPage::ModFolderPage(
ui(new Ui::ModFolderPage) ui(new Ui::ModFolderPage)
{ {
ui->setupUi(this); ui->setupUi(this);
// This is structured like that so that these changes
// do not affect the Resouce pack and Shader pack tabs
if(id == "mods") { if(id == "mods") {
auto act = new QAction(tr("Install Mods"), this); auto act = new QAction(tr("Download mods"), this);
ui->actionsToolbar->insertActionBefore(ui->actionView_configs,act); act->setToolTip(tr("Download mods from online mod platforms"));
ui->actionsToolbar->insertActionBefore(ui->actionAdd, act);
connect(act, &QAction::triggered, this, &ModFolderPage::on_actionInstall_mods_triggered); connect(act, &QAction::triggered, this, &ModFolderPage::on_actionInstall_mods_triggered);
ui->actionAdd->setText("Add .jar");
ui->actionAdd->setToolTip("Add mods via local file");
} }
ui->actionsToolbar->insertSpacer(ui->actionView_configs); ui->actionsToolbar->insertSpacer(ui->actionView_configs);
m_inst = inst; m_inst = inst;

View File

@ -96,7 +96,7 @@
<string>&amp;Add</string> <string>&amp;Add</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Add mods</string> <string>Add</string>
</property> </property>
</action> </action>
<action name="actionRemove"> <action name="actionRemove">