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,41 +648,43 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<widget class="QWidget" name="brush_preview" native="true">
|
||||||
<property name="topMargin">
|
<layout class="QHBoxLayout" name="container_brush_preview">
|
||||||
<number>8</number>
|
<property name="topMargin">
|
||||||
</property>
|
<number>8</number>
|
||||||
<item>
|
</property>
|
||||||
<widget class="QLabel" name="label_7">
|
<item>
|
||||||
<property name="text">
|
<widget class="QLabel" name="label_7">
|
||||||
<string>Brush preview :</string>
|
<property name="text">
|
||||||
</property>
|
<string>Brush preview :</string>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
</item>
|
||||||
<widget class="QWidget" name="widget_brush_preview" native="true">
|
<item>
|
||||||
<property name="minimumSize">
|
<widget class="QWidget" name="widget_brush_preview" native="true">
|
||||||
<size>
|
<property name="minimumSize">
|
||||||
<width>200</width>
|
<size>
|
||||||
<height>200</height>
|
<width>200</width>
|
||||||
</size>
|
<height>200</height>
|
||||||
</property>
|
</size>
|
||||||
</widget>
|
</property>
|
||||||
</item>
|
</widget>
|
||||||
<item>
|
</item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<item>
|
||||||
<property name="orientation">
|
<spacer name="horizontalSpacer_2">
|
||||||
<enum>Qt::Horizontal</enum>
|
<property name="orientation">
|
||||||
</property>
|
<enum>Qt::Horizontal</enum>
|
||||||
<property name="sizeHint" stdset="0">
|
</property>
|
||||||
<size>
|
<property name="sizeHint" stdset="0">
|
||||||
<width>40</width>
|
<size>
|
||||||
<height>20</height>
|
<width>40</width>
|
||||||
</size>
|
<height>20</height>
|
||||||
</property>
|
</size>
|
||||||
</spacer>
|
</property>
|
||||||
</item>
|
</spacer>
|
||||||
</layout>
|
</item>
|
||||||
|
</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