diff --git a/.gitignore b/.gitignore index 1ea62db..a380dad 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,12 @@ #Qt Translator Files *.qm + +# Other +Makefile +MinetestMapperGui +*.o +moc_mainwindow.cpp +qrc_minetestmappergui.cpp +ui_mainwindow.h + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e8c7174 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +adrido +rogier diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..670acd5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,4 @@ +Copyright: adrido and other authors. See AUTHORS. + +This work is licensed under a Creative Commons Attribution 3.0 Unported License. +See: http://creativecommons.org/licenses/by/3.0/ diff --git a/mainwindow.cpp b/mainwindow.cpp index 18351bf..ca74f61 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -42,6 +42,7 @@ InitStatics::InitStatics(void) } + MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) @@ -926,3 +927,39 @@ void MainWindow::on_actionEdit_heightmap_colors_txt_triggered() { QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(ui->path_HeightmapColors->text()).absoluteFilePath())); } + +void MainWindow::on_drawScaleLeft_toggled(bool checked) +{ + bool state = checked || ui->drawScaleTop->isChecked(); + ui->sidescaleInterval->setEnabled(state); + state = state && ui->sidescaleInterval->isChecked(); + ui->sidescaleIntervalMajor->setEnabled(state); + ui->sidescaleIntervalMinor->setEnabled(state); +} + +void MainWindow::on_drawScaleTop_toggled(bool checked) +{ + bool state = checked || ui->drawScaleLeft->isChecked(); + ui->sidescaleInterval->setEnabled(state); + state = state && ui->sidescaleInterval->isChecked(); + ui->sidescaleIntervalMajor->setEnabled(state); + ui->sidescaleIntervalMinor->setEnabled(state); +} + +void MainWindow::on_drawHeightscale_toggled(bool checked) +{ + ui->heightscaleInterval->setEnabled(checked); + bool state = checked && ui->heightscaleInterval->isChecked(); + ui->heightscaleIntervalMajor->setEnabled(state); + ui->heightscaleIntervalMinor->setEnabled(state); +} + +void MainWindow::on_tilecenter_clicked() +{ + ui->tiles_map->setText(tr("map center")); +} + +void MainWindow::on_tileorigin_clicked() +{ + ui->tiles_map->setText(tr("map origin (top left)")); +} diff --git a/mainwindow.h b/mainwindow.h index 7fdbb2b..c151b92 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -83,6 +83,16 @@ private slots: void on_actionEdit_heightmap_colors_txt_triggered(); + void on_drawScaleLeft_toggled(bool checked); + + void on_drawScaleTop_toggled(bool checked); + + void on_drawHeightscale_toggled(bool checked); + + void on_tilecenter_clicked(); + + void on_tileorigin_clicked(); + private: Ui::MainWindow *ui; QProgressBar *progressBar; diff --git a/mainwindow.ui b/mainwindow.ui index 04f656d..b396756 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1966,8 +1966,11 @@ + + A chunk is the unit of map generation. Usually 5x5x5 blocks. + - chunk + chunk-aligned @@ -1980,8 +1983,11 @@ + + A block is 16x16x16 nodes + - block + block-aligned true @@ -2012,16 +2018,28 @@ arrange - - + + + + + 0 + 0 + + tilecenter - + + + + 0 + 0 + + tileorigin @@ -2030,10 +2048,29 @@ - + + + + + 0 + 0 + + + + Arrange: + + + + + + + 0 + 0 + + - arrange at + at: @@ -2046,7 +2083,7 @@ - world + world center (0,0) true @@ -2056,7 +2093,7 @@ - map + map origin (top-left) @@ -2947,6 +2984,70 @@ p, li { white-space: pre-wrap; } + + heightscaleInterval + toggled(bool) + heightscaleIntervalMajor + setEnabled(bool) + + + 124 + 368 + + + 284 + 369 + + + + + heightscaleInterval + toggled(bool) + heightscaleIntervalMinor + setEnabled(bool) + + + 124 + 368 + + + 434 + 369 + + + + + sidescaleInterval + toggled(bool) + sidescaleIntervalMajor + setEnabled(bool) + + + 95 + 138 + + + 359 + 142 + + + + + sidescaleInterval + toggled(bool) + sidescaleIntervalMinor + setEnabled(bool) + + + 95 + 138 + + + 359 + 171 + + +