Skip to content

Commit

Permalink
Add tsx load option, first tiled compat commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KartikShrivastava committed Jun 5, 2022
1 parent 31dbcb7 commit 6d903c3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,20 @@ void MainWindow::on_actionOpen_triggered() {
this, tr("Open Project"), "",
tr("All supported formats (*.egm *.yyp *.project.gmx *.gm81 *.gmk *.gm6 *.gmd);;GameMaker: Studio 2 Projects "
"(*.yyp);;GameMaker: Studio Projects (*.project.gmx);;Classic "
"GameMaker Files (*.gm81 *.gmk *.gm6 *.gmd);;All Files (*)"));
"GameMaker Files (*.gm81 *.gmk *.gm6 *.gmd);;"
"Tiled Tileset (*.tsx);;All Files (*)"));
if (!fileName.isEmpty()) openFile(fileName);
}

void MainWindow::on_actionSave_triggered() {
const QString &filter = "EGM (*.egm)";
const QString &fileName = QFileDialog::getSaveFileName(this, tr("Save Project"), "", filter);

if(!fileName.isEmpty()) {
egm::WriteProject(_project.get(), fileName.toStdString());
}
}

void MainWindow::on_actionPreferences_triggered() {
PreferencesDialog preferencesDialog(this);
preferencesDialog.exec();
Expand Down
1 change: 1 addition & 0 deletions MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class MainWindow : public QMainWindow {
void on_actionNew_triggered();
void on_actionOpen_triggered();
void on_actionClearRecentMenu_triggered();
void on_actionSave_triggered();
void on_actionPreferences_triggered();
void on_actionExit_triggered();

Expand Down

0 comments on commit 6d903c3

Please sign in to comment.