mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Merge branch 'labelsforeveryone' into 'master'
Editor: Improve Models settings category layout See merge request OpenMW/openmw!4384
This commit is contained in:
commit
f817ff01b4
@ -408,12 +408,12 @@ void CSMPrefs::State::declare()
|
||||
declareShortcut(mValues->mKeyBindings.mScriptEditorUncomment, "Uncomment Selection");
|
||||
|
||||
declareCategory("Models");
|
||||
declareString(mValues->mModels.mBaseanim, "base animations").setTooltip("3rd person base model with textkeys-data");
|
||||
declareString(mValues->mModels.mBaseanimkna, "base animations, kna")
|
||||
.setTooltip("3rd person beast race base model with textkeys-data");
|
||||
declareString(mValues->mModels.mBaseanimfemale, "base animations, female")
|
||||
.setTooltip("3rd person female base model with textkeys-data");
|
||||
declareString(mValues->mModels.mWolfskin, "base animations, wolf").setTooltip("3rd person werewolf skin");
|
||||
declareString(mValues->mModels.mBaseanim, "Base Animations").setTooltip("Third person base model and animations");
|
||||
declareString(mValues->mModels.mBaseanimkna, "Base Animations, Beast")
|
||||
.setTooltip("Third person beast race base model and animations");
|
||||
declareString(mValues->mModels.mBaseanimfemale, "Base Animations, Female")
|
||||
.setTooltip("Third person female base model and animations");
|
||||
declareString(mValues->mModels.mWolfskin, "Base Animations, Werewolf").setTooltip("Third person werewolf skin");
|
||||
}
|
||||
|
||||
void CSMPrefs::State::declareCategory(const std::string& key)
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
#include "stringsetting.hpp"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QMutexLocker>
|
||||
|
||||
@ -26,17 +27,21 @@ CSMPrefs::StringSetting& CSMPrefs::StringSetting::setTooltip(const std::string&
|
||||
|
||||
CSMPrefs::SettingWidgets CSMPrefs::StringSetting::makeWidgets(QWidget* parent)
|
||||
{
|
||||
QLabel* label = new QLabel(getLabel(), parent);
|
||||
|
||||
mWidget = new QLineEdit(QString::fromStdString(getValue()), parent);
|
||||
mWidget->setMinimumWidth(300);
|
||||
|
||||
if (!mTooltip.empty())
|
||||
{
|
||||
QString tooltip = QString::fromUtf8(mTooltip.c_str());
|
||||
label->setToolTip(tooltip);
|
||||
mWidget->setToolTip(tooltip);
|
||||
}
|
||||
|
||||
connect(mWidget, &QLineEdit::textChanged, this, &StringSetting::textChanged);
|
||||
|
||||
return SettingWidgets{ .mLabel = nullptr, .mInput = mWidget };
|
||||
return SettingWidgets{ .mLabel = label, .mInput = mWidget };
|
||||
}
|
||||
|
||||
void CSMPrefs::StringSetting::updateWidget()
|
||||
|
Loading…
Reference in New Issue
Block a user