Skip to content

Commit

Permalink
Update to dsdalauncherstatev1.4
Browse files Browse the repository at this point in the history
Join the warp values into a single line
  • Loading branch information
Pedro-Beirao committed Sep 24, 2024
1 parent 0e69868 commit 1241347
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/states.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@ void states::loadStateNew(QTextStream &stream)
MainWindow::pMainWindow->complevel_comboBox()->setCurrentIndex(MainWindow::pMainWindow->complevel_comboBox()->count() - 1);
}
}
else if (buffer_name == "warp1") // warp 1
else if (buffer_name == "warp") // warp
{
MainWindow::pMainWindow->episode_lineEdit()->setText(buffer_value);
}
else if (buffer_name == "warp2") // warp 2
{
MainWindow::pMainWindow->level_lineEdit()->setText(buffer_value);
int pos = buffer_value.indexOf(' ');
if (pos != -1)
{
MainWindow::pMainWindow->episode_lineEdit()->setText(buffer_value.mid(0, pos).trimmed());
MainWindow::pMainWindow->level_lineEdit()->setText(buffer_value.mid(pos + 1).trimmed());
}
}
else if (buffer_name == "skill") // skill
{
Expand Down Expand Up @@ -293,8 +294,7 @@ void states::saveStateToFile(QString filePath)

out << "iwad " + ui->iwad_comboBox()->currentText() + "\n";
out << "complevel " + ui->complevel_comboBox()->currentText() + "\n";
out << "warp1 " + ui->episode_lineEdit()->text() + "\n";
out << "warp2 " + ui->level_lineEdit()->text() + "\n";
out << "warp " + ui->episode_lineEdit()->text() + " " + ui->level_lineEdit()->text() + "\n";
out << "skill " + QString::number(ui->difficulty_comboBox()->currentIndex()) + "\n";
out << "box1 " + bool_to_string(ui->toggle1_checkBox()->isChecked()) + "\n";
out << "box2 " + bool_to_string(ui->toggle2_checkBox()->isChecked()) + "\n";
Expand Down

0 comments on commit 1241347

Please sign in to comment.