minimap generator: add option to deselect all ADTs with right click
settings: add default value to import.txt file
This commit is contained in:
@@ -216,8 +216,8 @@ namespace noggit
|
|||||||
{
|
{
|
||||||
if (world->mapIndex.hasTile(tile_index(x + i, y + j)))
|
if (world->mapIndex.hasTile(tile_index(x + i, y + j)))
|
||||||
{
|
{
|
||||||
_render_settings.selected_tiles[64 * (x + i) + (y + j)] = !QApplication::keyboardModifiers().testFlag(
|
_render_settings.selected_tiles[64 * (x + i) + (y + j)]
|
||||||
Qt::ControlModifier);
|
= !QApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -227,8 +227,8 @@ namespace noggit
|
|||||||
{
|
{
|
||||||
if (world->mapIndex.hasTile(tile_index(tile.x(), tile.y())))
|
if (world->mapIndex.hasTile(tile_index(tile.x(), tile.y())))
|
||||||
{
|
{
|
||||||
_render_settings.selected_tiles[64 * tile.x() + tile.y()] = !QApplication::keyboardModifiers().testFlag(
|
_render_settings.selected_tiles[64 * tile.x() + tile.y()]
|
||||||
Qt::ControlModifier);
|
= !QApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,6 +236,14 @@ namespace noggit
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
QObject::connect
|
||||||
|
( _minimap_widget, &minimap_widget::reset_selection
|
||||||
|
, [this, world] ()
|
||||||
|
{
|
||||||
|
_render_settings.selected_tiles.fill(false);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MinimapCreator::changeRadius(float change)
|
void MinimapCreator::changeRadius(float change)
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ namespace noggit
|
|||||||
{
|
{
|
||||||
gamePathField->actual->setText (_settings->value ("project/game_path").toString());
|
gamePathField->actual->setText (_settings->value ("project/game_path").toString());
|
||||||
projectPathField->actual->setText (_settings->value ("project/path").toString());
|
projectPathField->actual->setText (_settings->value ("project/path").toString());
|
||||||
importPathField->actual->setText (_settings->value ("project/import_file").toString());
|
importPathField->actual->setText (_settings->value ("project/import_file", "import.txt").toString());
|
||||||
wmvLogPathField->actual->setText (_settings->value ("project/wmv_log_file").toString());
|
wmvLogPathField->actual->setText (_settings->value ("project/wmv_log_file").toString());
|
||||||
viewDistanceField->setValue (_settings->value ("view_distance", 1000.f).toFloat());
|
viewDistanceField->setValue (_settings->value ("view_distance", 1000.f).toFloat());
|
||||||
farZField->setValue (_settings->value ("farZ", 2048.f).toFloat());
|
farZField->setValue (_settings->value ("farZ", 2048.f).toFloat());
|
||||||
|
|||||||
@@ -208,9 +208,11 @@ namespace noggit
|
|||||||
|
|
||||||
void minimap_widget::mousePressEvent(QMouseEvent* event)
|
void minimap_widget::mousePressEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
if (event->button() != Qt::LeftButton)
|
if (event->button() == Qt::RightButton)
|
||||||
{
|
{
|
||||||
event->ignore();
|
_is_selecting = false;
|
||||||
|
emit reset_selection();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,9 @@ namespace noggit
|
|||||||
QPoint locateTile(QMouseEvent* event);
|
QPoint locateTile(QMouseEvent* event);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void map_clicked (const ::math::vector_3d&);
|
void map_clicked(const ::math::vector_3d&);
|
||||||
void tile_clicked (const QPoint&);
|
void tile_clicked(const QPoint&);
|
||||||
|
void reset_selection();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
World const* _world;
|
World const* _world;
|
||||||
|
|||||||
Reference in New Issue
Block a user