Remove unused features in terrain painting dialog
This commit is contained in:
parent
a76853c237
commit
110d16e0b6
4 changed files with 45 additions and 78 deletions
|
@ -12,6 +12,9 @@ DialogTerrainPainting::DialogTerrainPainting(QWidget*parent, TerrainDefinition*
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
// TEMP
|
||||||
|
ui->brush_preview->hide();
|
||||||
|
|
||||||
_terrain_original = terrain;
|
_terrain_original = terrain;
|
||||||
_terrain_modified = (TerrainDefinition*)TerrainDefinitionClass.create();
|
_terrain_modified = (TerrainDefinition*)TerrainDefinitionClass.create();
|
||||||
|
|
||||||
|
@ -43,12 +46,8 @@ void DialogTerrainPainting::keyReleaseEvent(QKeyEvent* event)
|
||||||
ui->input_brush_mode->setCurrentIndex(2);
|
ui->input_brush_mode->setCurrentIndex(2);
|
||||||
event->accept();
|
event->accept();
|
||||||
break;
|
break;
|
||||||
case Qt::Key_F11:
|
|
||||||
ui->input_brush_mode->setCurrentIndex(3);
|
|
||||||
event->accept();
|
|
||||||
break;
|
|
||||||
case Qt::Key_F12:
|
case Qt::Key_F12:
|
||||||
ui->input_brush_mode->setCurrentIndex(4);
|
ui->input_brush_mode->setCurrentIndex(3);
|
||||||
event->accept();
|
event->accept();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -236,22 +236,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_14">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>F11</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -272,17 +256,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_15">
|
|
||||||
<property name="text">
|
|
||||||
<string>Switch to magix fix tool</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label_16">
|
<widget class="QLabel" name="label_16">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
@ -298,7 +272,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QLabel" name="label_17">
|
<widget class="QLabel" name="label_17">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Switch to restore tool</string>
|
<string>Switch to restore tool</string>
|
||||||
|
@ -570,11 +544,6 @@
|
||||||
<string>Flatten terrain (F4)</string>
|
<string>Flatten terrain (F4)</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Fix discontinuities (F11)</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Restore to default (F12)</string>
|
<string>Restore to default (F12)</string>
|
||||||
|
@ -679,7 +648,8 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<widget class="QWidget" name="brush_preview" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="container_brush_preview">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -714,6 +684,7 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
|
|
|
@ -90,8 +90,6 @@ QString PaintingBrush::getHelpText()
|
||||||
return QObject::tr("<strong>Left click</strong>: add random noise to terrain<br><br><strong>Right click</strong>: smooth details");
|
return QObject::tr("<strong>Left click</strong>: add random noise to terrain<br><br><strong>Right click</strong>: smooth details");
|
||||||
case PAINTING_BRUSH_FLATTEN:
|
case PAINTING_BRUSH_FLATTEN:
|
||||||
return QObject::tr("<strong>Left click</strong>: flatten at height picked with right click<br><br><strong>Right click</strong>: pick height at center");
|
return QObject::tr("<strong>Left click</strong>: flatten at height picked with right click<br><br><strong>Right click</strong>: pick height at center");
|
||||||
case PAINTING_BRUSH_FIX_DISCONTINUITIES:
|
|
||||||
return QObject::tr("<strong>Left click</strong>: fix discontinuities in slope");
|
|
||||||
case PAINTING_BRUSH_RESTORE:
|
case PAINTING_BRUSH_RESTORE:
|
||||||
return QObject::tr("<strong>Left click</strong>: cancel all modifications on terrain");
|
return QObject::tr("<strong>Left click</strong>: cancel all modifications on terrain");
|
||||||
}
|
}
|
||||||
|
@ -127,7 +125,7 @@ void PaintingBrush::applyToTerrain(TerrainDefinition* terrain, double x, double
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
terrainBrushAddNoise(terrain->height_map, &brush, _noise, brush_strength * 0.5);
|
terrainBrushAddNoise(terrain->height_map, &brush, _noise, brush_strength * 0.3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PAINTING_BRUSH_FLATTEN:
|
case PAINTING_BRUSH_FLATTEN:
|
||||||
|
|
|
@ -10,8 +10,7 @@ typedef enum
|
||||||
PAINTING_BRUSH_RAISE = 0,
|
PAINTING_BRUSH_RAISE = 0,
|
||||||
PAINTING_BRUSH_SMOOTH = 1,
|
PAINTING_BRUSH_SMOOTH = 1,
|
||||||
PAINTING_BRUSH_FLATTEN = 2,
|
PAINTING_BRUSH_FLATTEN = 2,
|
||||||
PAINTING_BRUSH_FIX_DISCONTINUITIES = 3,
|
PAINTING_BRUSH_RESTORE = 3
|
||||||
PAINTING_BRUSH_RESTORE = 4
|
|
||||||
} PaintingBrushMode;
|
} PaintingBrushMode;
|
||||||
|
|
||||||
class PaintingBrush
|
class PaintingBrush
|
||||||
|
|
Loading…
Reference in a new issue