mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 18:19:40 +00:00
Brush maximum size to a custom setting
This commit is contained in:
parent
17e01ca336
commit
c2cddc91e4
3 changed files with 9 additions and 3 deletions
|
@ -242,6 +242,8 @@ void CSMPrefs::State::declare()
|
||||||
addValues (landeditOutsideCell);
|
addValues (landeditOutsideCell);
|
||||||
declareEnum ("outside-visible-landedit", "Handling land edit outside of visible cells", showAndLandEdit).
|
declareEnum ("outside-visible-landedit", "Handling land edit outside of visible cells", showAndLandEdit).
|
||||||
addValues (landeditOutsideVisibleCell);
|
addValues (landeditOutsideVisibleCell);
|
||||||
|
declareInt ("texturebrush-maximumsize", "Maximum texture brush size", 50).
|
||||||
|
setMin (1);
|
||||||
|
|
||||||
declareCategory ("Key Bindings");
|
declareCategory ("Key Bindings");
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,9 @@
|
||||||
#include <QSizePolicy>
|
#include <QSizePolicy>
|
||||||
|
|
||||||
#include "scenetool.hpp"
|
#include "scenetool.hpp"
|
||||||
|
|
||||||
#include "../../model/doc/document.hpp"
|
#include "../../model/doc/document.hpp"
|
||||||
|
#include "../../model/prefs/state.hpp"
|
||||||
#include "../../model/world/data.hpp"
|
#include "../../model/world/data.hpp"
|
||||||
#include "../../model/world/idtable.hpp"
|
#include "../../model/world/idtable.hpp"
|
||||||
#include "../../model/world/landtexture.hpp"
|
#include "../../model/world/landtexture.hpp"
|
||||||
|
@ -33,11 +35,11 @@ CSVWidget::BrushSizeControls::BrushSizeControls(const QString &title, QWidget *p
|
||||||
mBrushSizeSlider = new QSlider(Qt::Horizontal);
|
mBrushSizeSlider = new QSlider(Qt::Horizontal);
|
||||||
mBrushSizeSlider->setTickPosition(QSlider::TicksBothSides);
|
mBrushSizeSlider->setTickPosition(QSlider::TicksBothSides);
|
||||||
mBrushSizeSlider->setTickInterval(10);
|
mBrushSizeSlider->setTickInterval(10);
|
||||||
mBrushSizeSlider->setRange(1, 50);
|
mBrushSizeSlider->setRange(1, CSMPrefs::get()["3D Scene Editing"]["texturebrush-maximumsize"].toInt());
|
||||||
mBrushSizeSlider->setSingleStep(1);
|
mBrushSizeSlider->setSingleStep(1);
|
||||||
|
|
||||||
mBrushSizeSpinBox = new QSpinBox;
|
mBrushSizeSpinBox = new QSpinBox;
|
||||||
mBrushSizeSpinBox->setRange(1, 50);
|
mBrushSizeSpinBox->setRange(1, CSMPrefs::get()["3D Scene Editing"]["texturebrush-maximumsize"].toInt());
|
||||||
mBrushSizeSpinBox->setSingleStep(1);
|
mBrushSizeSpinBox->setSingleStep(1);
|
||||||
|
|
||||||
mLayoutSliderSize = new QHBoxLayout;
|
mLayoutSliderSize = new QHBoxLayout;
|
||||||
|
@ -273,6 +275,8 @@ void CSVWidget::SceneToolTextureBrush::clicked (const QModelIndex& index)
|
||||||
void CSVWidget::SceneToolTextureBrush::activate ()
|
void CSVWidget::SceneToolTextureBrush::activate ()
|
||||||
{
|
{
|
||||||
QPoint position = QCursor::pos();
|
QPoint position = QCursor::pos();
|
||||||
|
mTextureBrushWindow->mSizeSliders->mBrushSizeSlider->setRange(1, CSMPrefs::get()["3D Scene Editing"]["texturebrush-maximumsize"].toInt());
|
||||||
|
mTextureBrushWindow->mSizeSliders->mBrushSizeSpinBox->setRange(1, CSMPrefs::get()["3D Scene Editing"]["texturebrush-maximumsize"].toInt());
|
||||||
mTextureBrushWindow->move (position);
|
mTextureBrushWindow->move (position);
|
||||||
mTextureBrushWindow->show();
|
mTextureBrushWindow->show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,9 @@ namespace CSVWidget
|
||||||
public:
|
public:
|
||||||
BrushSizeControls(const QString &title, QWidget *parent);
|
BrushSizeControls(const QString &title, QWidget *parent);
|
||||||
QSlider *mBrushSizeSlider;
|
QSlider *mBrushSizeSlider;
|
||||||
|
QSpinBox *mBrushSizeSpinBox;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSpinBox *mBrushSizeSpinBox;
|
|
||||||
QHBoxLayout *mLayoutSliderSize;
|
QHBoxLayout *mLayoutSliderSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue