add more options to copy instance dialog

- Copy game options, copy resource packs, copy shaders,
copy servers, and copy mods
- Also made a new InstanceCopyPrefs struct to store those
options rather than passing 7 different booleans into
InstanceCopyTask's constructor

Signed-off-by: Marcelo Hernandez <marcelohdez.inq@gmail.com>
This commit is contained in:
Marcelo Hernandez
2022-10-22 14:50:32 -04:00
parent 8b28ed67ae
commit e7e56eb1e3
8 changed files with 254 additions and 22 deletions

View File

@ -1616,7 +1616,17 @@ void MainWindow::on_actionCopyInstance_triggered()
if (!copyInstDlg.exec())
return;
auto copyTask = new InstanceCopyTask(m_selectedInstance, copyInstDlg.shouldCopySaves(), copyInstDlg.shouldKeepPlaytime());
auto copyTask = new InstanceCopyTask(
m_selectedInstance,
InstanceCopyPrefs {
copyInstDlg.shouldCopySaves(),
copyInstDlg.shouldKeepPlaytime(),
copyInstDlg.shouldCopyGameOptions(),
copyInstDlg.shouldCopyResourcePacks(),
copyInstDlg.shouldCopyShaderPacks(),
copyInstDlg.shouldCopyServers(),
copyInstDlg.shouldCopyMods()
});
copyTask->setName(copyInstDlg.instName());
copyTask->setGroup(copyInstDlg.instGroup());
copyTask->setIcon(copyInstDlg.iconKey());