added new parameter config for nav mesh
This commit is contained in:
@@ -78,6 +78,21 @@ QNavMeshSettings::QNavMeshSettings(NM::NavMeshSettings* settings, QWidget* paren
|
|||||||
++row;
|
++row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MIN REGION SIZE
|
||||||
|
{
|
||||||
|
lay->addWidget(new QLabel("min region size"), row, 0);
|
||||||
|
QLabel* lblMinRegionSize = new QLabel("");
|
||||||
|
lay->addWidget(lblMinRegionSize, row, 2);
|
||||||
|
QSlider* sldRegionMinSize = new QSlider(Qt::Orientation::Horizontal); sldRegionMinSize->setMinimum(400); sldRegionMinSize->setMaximum(10000);
|
||||||
|
connect(sldRegionMinSize, &QSlider::valueChanged, [settings, sldRegionMinSize, lblMinRegionSize] () {
|
||||||
|
settings->regionMinSize = sldRegionMinSize->value() / 100.0f;
|
||||||
|
lblMinRegionSize->setText(QString("%1 m").arg(settings->regionMinSize, 5, 'f', 2, 0));
|
||||||
|
});
|
||||||
|
sldRegionMinSize->setValue(settings->regionMinSize * 100.0f);
|
||||||
|
lay->addWidget(sldRegionMinSize, row, 1);
|
||||||
|
++row;
|
||||||
|
}
|
||||||
|
|
||||||
QDialogButtonBox* box = new QDialogButtonBox(QDialogButtonBox::StandardButton::Ok | QDialogButtonBox::StandardButton::Close);
|
QDialogButtonBox* box = new QDialogButtonBox(QDialogButtonBox::StandardButton::Ok | QDialogButtonBox::StandardButton::Close);
|
||||||
lay->addWidget(box, row, 0, 1, 3);
|
lay->addWidget(box, row, 0, 1, 3);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user