Update Flatten angled tool
Now this tool turn to red when you have selected an angle more high then the maximum climb value You can now see which current angle/rotation did you have set on the tool.
This commit is contained in:
@@ -859,6 +859,16 @@ void WorldRender::draw (glm::mat4x4 const& model_view
|
||||
|
||||
float radius = 1.2f * brush_radius;
|
||||
|
||||
if (angled_mode && terrainMode == editing_mode::flatten_blur)
|
||||
{
|
||||
if (angle > 57.2958f) // 1 radian
|
||||
{
|
||||
color.x = 1.f;
|
||||
color.y = 0.f;
|
||||
color.z = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (angled_mode && !use_ref_pos)
|
||||
{
|
||||
glm::vec3 pos = cursor_pos;
|
||||
|
||||
@@ -109,6 +109,16 @@ namespace Noggit
|
||||
_angle_slider->setToolTip("Angle");
|
||||
_angle_slider->setMinimumHeight(80);
|
||||
angle_layout->addWidget(_angle_slider, 0, 1);
|
||||
|
||||
_angle_info = new QLabel(this);
|
||||
_angle_info->setText(QString::number(_angle_slider->value()));
|
||||
angle_layout->addWidget(new QLabel(tr("Angle : ")), 1, 0);
|
||||
angle_layout->addWidget(_angle_info, 1, 1);
|
||||
|
||||
_orientation_info = new QLabel(this);
|
||||
_orientation_info->setText(QString::number(_orientation_dial->value()));
|
||||
angle_layout->addWidget(new QLabel(tr("Orientation : ")), 2, 0);
|
||||
angle_layout->addWidget(_orientation_info, 2, 1);
|
||||
|
||||
flatten_only_layout->addWidget(_angle_group);
|
||||
|
||||
@@ -158,6 +168,7 @@ namespace Noggit
|
||||
, [&] (int v)
|
||||
{
|
||||
_angle = v;
|
||||
_angle_info->setText(QString::number(_angle));
|
||||
}
|
||||
);
|
||||
|
||||
@@ -165,6 +176,7 @@ namespace Noggit
|
||||
, [this] (int v)
|
||||
{
|
||||
setOrientation(v + 90.0f);
|
||||
_orientation_info->setText(QString::number(v));
|
||||
}
|
||||
);
|
||||
|
||||
@@ -286,6 +298,7 @@ namespace Noggit
|
||||
_orientation += 360.0f;
|
||||
}
|
||||
_orientation_dial->setSliderPosition(_orientation - 90.0f);
|
||||
_orientation_info->setText(QString::number(_orientation_dial->value()));
|
||||
}
|
||||
|
||||
void flatten_blur_tool::changeAngle(float change)
|
||||
|
||||
@@ -74,6 +74,8 @@ namespace Noggit
|
||||
QGroupBox* _angle_group;
|
||||
QSlider* _angle_slider;
|
||||
QDial* _orientation_dial;
|
||||
QLabel* _orientation_info;
|
||||
QLabel* _angle_info;
|
||||
|
||||
QGroupBox* _lock_group;
|
||||
QDoubleSpinBox* _lock_x;
|
||||
|
||||
Reference in New Issue
Block a user