diff --git a/interface/resources/qml/dialogs/preferences/SliderPreference.qml b/interface/resources/qml/dialogs/preferences/SliderPreference.qml index e9013bc17a..79c7149f3e 100644 --- a/interface/resources/qml/dialogs/preferences/SliderPreference.qml +++ b/interface/resources/qml/dialogs/preferences/SliderPreference.qml @@ -53,6 +53,8 @@ Preference { Slider { id: slider value: preference.value + minimumValue: preference.min + maximumValue: preference.max width: 130 anchors { right: parent.right diff --git a/interface/resources/qml/hifi/tablet/ControllerSettings.qml b/interface/resources/qml/hifi/tablet/ControllerSettings.qml index f134e280e6..4ee69c4982 100644 --- a/interface/resources/qml/hifi/tablet/ControllerSettings.qml +++ b/interface/resources/qml/hifi/tablet/ControllerSettings.qml @@ -14,218 +14,238 @@ import "../../styles-uit" import "../../controls" import "../../controls-uit" as HifiControls import "../../dialogs" +import "../../dialogs/preferences" -StackView { - id: stack - initialItem: inputConfiguration - property alias messageVisible: imageMessageBox.visible - property alias selectedPlugin: box.currentText - Rectangle { - id: inputConfiguration - anchors.fill: parent +PreferencesDialog { + id: root + objectName: "ControlSettings" + title: "Control Settings" + showCategories: ["VR Movement", inputConfigurationComponents] + property var settings: Settings { + category: root.objectName + property alias x: root.x + property alias y: root.y + property alias width: root.width + property alias height: root.height + } + Component { + id: inputConfigurationComponents - HifiConstants { id: hifi } + Preference { - color: hifi.colors.baseGray + StackView { + id: stack + initialItem: inputConfiguration + property alias messageVisible: imageMessageBox.visible + property alias selectedPlugin: box.currentText + Rectangle { + id: inputConfiguration + anchors.fill: parent - property var pluginSettings: null + HifiConstants { id: hifi } - HifiControls.ImageMessageBox { - id: imageMessageBox - anchors.fill: parent - z: 2000 - imageWidth: 442 - imageHeight: 670 - source: "../../../images/calibration-help.png" - } + color: hifi.colors.baseGray - Rectangle { - width: inputConfiguration.width - height: 1 - color: hifi.colors.baseGrayShadow - x: -hifi.dimensions.contentMargin.x - } + property var pluginSettings: null - RalewayRegular { - id: header - text: "Control Settings" - size: 22 - color: "white" + HifiControls.ImageMessageBox { + id: imageMessageBox + anchors.fill: parent + z: 2000 + imageWidth: 442 + imageHeight: 670 + source: "../../../images/calibration-help.png" + } - anchors.top: inputConfiguration.top - anchors.left: inputConfiguration.left - anchors.leftMargin: 20 - anchors.topMargin: 20 - } + Rectangle { + width: inputConfiguration.width + height: 1 + color: hifi.colors.baseGrayShadow + x: -hifi.dimensions.contentMargin.x + } + + RalewayRegular { + id: header + text: "Control Settings" + size: 22 + color: "white" + + anchors.top: inputConfiguration.top + anchors.left: inputConfiguration.left + anchors.leftMargin: 20 + anchors.topMargin: 20 + } + + Separator { + id: headerSeparator + width: inputConfiguration.width + anchors.top: header.bottom + anchors.topMargin: 10 + } + + HiFiGlyphs { + id: sourceGlyph + text: hifi.glyphs.source + size: 36 + color: hifi.colors.blueHighlight + + anchors.top: headerSeparator.bottom + anchors.left: inputConfiguration.left + anchors.leftMargin: 40 + anchors.topMargin: 20 + } + + RalewayRegular { + id: configuration + text: "SELECT DEVICE" + size: 15 + color: hifi.colors.lightGrayText - Separator { - id: headerSeparator - width: inputConfiguration.width - anchors.top: header.bottom - anchors.topMargin: 10 - } + anchors.top: headerSeparator.bottom + anchors.left: sourceGlyph.right + anchors.leftMargin: 10 + anchors.topMargin: 30 + } - HiFiGlyphs { - id: sourceGlyph - text: hifi.glyphs.source - size: 36 - color: hifi.colors.blueHighlight + Row { + id: configRow + z: 999 + anchors.top: sourceGlyph.bottom + anchors.topMargin: 20 + anchors.left: sourceGlyph.left + anchors.leftMargin: 40 + spacing: 10 + HifiControls.ComboBox { + id: box + width: 160 + z: 999 + editable: true + colorScheme: hifi.colorSchemes.dark + model: inputPlugins() + label: "" - anchors.top: headerSeparator.bottom - anchors.left: inputConfiguration.left - anchors.leftMargin: 40 - anchors.topMargin: 20 - } + onCurrentIndexChanged: { + changeSource(); + } + } - RalewayRegular { - id: configuration - text: "SELECT DEVICE" - size: 15 - color: hifi.colors.lightGrayText + HifiControls.CheckBox { + id: checkBox + colorScheme: hifi.colorSchemes.dark + text: "show all input devices" + + onClicked: { + inputPlugins(); + changeSource(); + } + } + } - anchors.top: headerSeparator.bottom - anchors.left: sourceGlyph.right - anchors.leftMargin: 10 - anchors.topMargin: 30 - } - - Row { - id: configRow - z: 999 - anchors.top: sourceGlyph.bottom - anchors.topMargin: 20 - anchors.left: sourceGlyph.left - anchors.leftMargin: 40 - spacing: 10 - HifiControls.ComboBox { - id: box - width: 160 - z: 999 - editable: true - colorScheme: hifi.colorSchemes.dark - model: inputPlugins() - label: "" - - onCurrentIndexChanged: { - changeSource(); - } - } - - HifiControls.CheckBox { - id: checkBox - colorScheme: hifi.colorSchemes.dark - text: "show all input devices" - - onClicked: { - inputPlugins(); - changeSource(); - } - } - } + Separator { + id: configurationSeparator + z: 0 + width: inputConfiguration.width + anchors.top: configRow.bottom + anchors.topMargin: 10 + } - Separator { - id: configurationSeparator - z: 0 - width: inputConfiguration.width - anchors.top: configRow.bottom - anchors.topMargin: 10 - } + HiFiGlyphs { + id: sliderGlyph + text: hifi.glyphs.sliders + size: 36 + color: hifi.colors.blueHighlight + + anchors.top: configurationSeparator.bottom + anchors.left: inputConfiguration.left + anchors.leftMargin: 40 + anchors.topMargin: 20 + } + + RalewayRegular { + id: configurationHeader + text: "CONFIGURATION" + size: 15 + color: hifi.colors.lightGrayText - HiFiGlyphs { - id: sliderGlyph - text: hifi.glyphs.sliders - size: 36 - color: hifi.colors.blueHighlight + anchors.top: configurationSeparator.bottom + anchors.left: sliderGlyph.right + anchors.leftMargin: 10 + anchors.topMargin: 30 + } - anchors.top: configurationSeparator.bottom - anchors.left: inputConfiguration.left - anchors.leftMargin: 40 - anchors.topMargin: 20 - } + Loader { + id: loader + asynchronous: false - RalewayRegular { - id: configurationHeader - text: "CONFIGURATION" - size: 15 - color: hifi.colors.lightGrayText + width: inputConfiguration.width + anchors.left: inputConfiguration.left + anchors.right: inputConfiguration.right + anchors.top: configurationHeader.bottom + anchors.topMargin: 10 + anchors.bottom: inputConfiguration.bottom + source: InputConfiguration.configurationLayout(box.currentText); + onLoaded: { + if (loader.item.hasOwnProperty("pluginName")) { + if (box.currentText === "Vive") { + loader.item.pluginName = "OpenVR"; + } else { + loader.item.pluginName = box.currentText; + } + } - anchors.top: configurationSeparator.bottom - anchors.left: sliderGlyph.right - anchors.leftMargin: 10 - anchors.topMargin: 30 - } - - Loader { - id: loader - asynchronous: false - - width: inputConfiguration.width - anchors.left: inputConfiguration.left - anchors.right: inputConfiguration.right - anchors.top: configurationHeader.bottom - anchors.topMargin: 10 - anchors.bottom: inputConfiguration.bottom - - source: InputConfiguration.configurationLayout(box.currentText); - onLoaded: { - if (loader.item.hasOwnProperty("pluginName")) { - if (box.currentText === "Vive") { - loader.item.pluginName = "OpenVR"; - } else { - loader.item.pluginName = box.currentText; + if (loader.item.hasOwnProperty("displayInformation")) { + loader.item.displayConfiguration(); + } + } } } - if (loader.item.hasOwnProperty("displayInformation")) { - loader.item.displayConfiguration(); + + function inputPlugins() { + if (checkBox.checked) { + return InputConfiguration.inputPlugins(); + } else { + return InputConfiguration.activeInputPlugins(); + } + } + + function initialize() { + changeSource(); + } + + function changeSource() { + loader.source = ""; + var source = ""; + if (box.currentText == "Vive") { + source = InputConfiguration.configurationLayout("OpenVR"); + } else { + source = InputConfiguration.configurationLayout(box.currentText); + } + + loader.source = source; + if (source === "") { + box.label = "(not configurable)"; + } else { + box.label = ""; + } + } + + Timer { + id: timer + repeat: false + interval: 300 + onTriggered: initialize() + } + + Component.onCompleted: { + timer.start(); } } } } - - - function inputPlugins() { - if (checkBox.checked) { - return InputConfiguration.inputPlugins(); - } else { - return InputConfiguration.activeInputPlugins(); - } - } - - function initialize() { - changeSource(); - } - - function changeSource() { - loader.source = ""; - var source = ""; - if (box.currentText == "Vive") { - source = InputConfiguration.configurationLayout("OpenVR"); - } else { - source = InputConfiguration.configurationLayout(box.currentText); - } - - loader.source = source; - if (source === "") { - box.label = "(not configurable)"; - } else { - box.label = ""; - } - } - - Timer { - id: timer - repeat: false - interval: 300 - onTriggered: initialize() - } - - Component.onCompleted: { - timer.start(); - } } diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b57dd84d33..13dea71ba4 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3690,8 +3690,6 @@ void Application::keyPressEvent(QKeyEvent* event) { Menu::getInstance()->triggerOption(MenuOption::Log); } else if (isMeta) { Menu::getInstance()->triggerOption(MenuOption::AddressBar); - } else if (isShifted) { - Menu::getInstance()->triggerOption(MenuOption::LodTools); } break; @@ -7509,18 +7507,6 @@ SharedSoundPointer Application::getSampleSound() const { return _sampleSound; } -void Application::loadLODToolsDialog() { - auto tabletScriptingInterface = DependencyManager::get(); - auto tablet = dynamic_cast(tabletScriptingInterface->getTablet(SYSTEM_TABLET)); - if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) { - auto dialogsManager = DependencyManager::get(); - dialogsManager->lodTools(); - } else { - tablet->pushOntoStack("hifi/dialogs/TabletLODTools.qml"); - } -} - - void Application::loadEntityStatisticsDialog() { auto tabletScriptingInterface = DependencyManager::get(); auto tablet = dynamic_cast(tabletScriptingInterface->getTablet(SYSTEM_TABLET)); diff --git a/interface/src/Application.h b/interface/src/Application.h index 4946dd7ad9..13c5056402 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -65,7 +65,6 @@ #include "scripting/DialogsManagerScriptingInterface.h" #include "ui/ApplicationOverlay.h" #include "ui/EntityScriptServerLogDialog.h" -#include "ui/LodToolsDialog.h" #include "ui/LogDialog.h" #include "ui/OctreeStatsDialog.h" #include "ui/OverlayConductor.h" @@ -403,7 +402,6 @@ public slots: void addAssetToWorldMessageClose(); - void loadLODToolsDialog(); void loadEntityStatisticsDialog(); void loadDomainConnectionDialog(); void showScriptLogs(); diff --git a/interface/src/LODManager.cpp b/interface/src/LODManager.cpp index d06ba14bcf..90318c2d30 100644 --- a/interface/src/LODManager.cpp +++ b/interface/src/LODManager.cpp @@ -122,10 +122,7 @@ void LODManager::autoAdjustLOD(float realTimeDelta) { } if (oldOctreeSizeScale != _octreeSizeScale) { - auto lodToolsDialog = DependencyManager::get()->getLodToolsDialog(); - if (lodToolsDialog) { - lodToolsDialog->reloadSliders(); - } + //TODO: check Preferences dialog } } diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index b8fbfcd07f..d60e59a1cb 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -469,10 +469,6 @@ Menu::Menu() { }); } - // Developer > Render > LOD Tools - addActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::LodTools, 0, - qApp, SLOT(loadLODToolsDialog())); - // HACK enable texture decimation { auto action = addCheckableActionToQMenuAndActionHash(renderOptionsMenu, "Decimate Textures"); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 86e44775c5..b8690d5b26 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -121,7 +121,6 @@ namespace MenuOption { const QString ActionMotorControl = "Enable Default Motor Control"; const QString LoadScript = "Open and Run Script File..."; const QString LoadScriptURL = "Open and Run Script from URL..."; - const QString LodTools = "LOD Tools"; const QString Login = "Login/Sign Up"; const QString Log = "Log"; const QString LogExtraTimings = "Log Extra Timing Details"; diff --git a/interface/src/ui/DialogsManager.cpp b/interface/src/ui/DialogsManager.cpp index d01e7d6671..05fc3e48ba 100644 --- a/interface/src/ui/DialogsManager.cpp +++ b/interface/src/ui/DialogsManager.cpp @@ -23,7 +23,6 @@ #include "ConnectionFailureDialog.h" #include "DomainConnectionDialog.h" #include "HMDToolsDialog.h" -#include "LodToolsDialog.h" #include "LoginDialog.h" #include "OctreeStatsDialog.h" #include "PreferencesDialog.h" @@ -126,16 +125,6 @@ void DialogsManager::octreeStatsDetails() { _octreeStatsDialog->raise(); } -void DialogsManager::lodTools() { - if (!_lodToolsDialog) { - maybeCreateDialog(_lodToolsDialog); - - connect(_lodToolsDialog, SIGNAL(closed()), _lodToolsDialog, SLOT(deleteLater())); - _lodToolsDialog->show(); - } - _lodToolsDialog->raise(); -} - void DialogsManager::hmdTools(bool showTools) { if (showTools) { if (!_hmdToolsDialog) { diff --git a/interface/src/ui/DialogsManager.h b/interface/src/ui/DialogsManager.h index f17ac39a7e..c24f0fc4c0 100644 --- a/interface/src/ui/DialogsManager.h +++ b/interface/src/ui/DialogsManager.h @@ -22,7 +22,6 @@ class AnimationsDialog; class AttachmentsDialog; class CachesSizeDialog; -class LodToolsDialog; class OctreeStatsDialog; class ScriptEditorWindow; class TestingDialog; @@ -35,7 +34,6 @@ class DialogsManager : public QObject, public Dependency { public: QPointer getHMDToolsDialog() const { return _hmdToolsDialog; } - QPointer getLodToolsDialog() const { return _lodToolsDialog; } QPointer getOctreeStatsDialog() const { return _octreeStatsDialog; } QPointer getTestingDialog() const { return _testingDialog; } void emitAddressBarShown(bool visible) { emit addressBarShown(visible); } @@ -49,7 +47,6 @@ public slots: void toggleLoginDialog(); void showLoginDialog(); void octreeStatsDetails(); - void lodTools(); void hmdTools(bool showTools); void showDomainConnectionDialog(); void showTestingResults(); @@ -76,7 +73,6 @@ private: QPointer _cachesSizeDialog; QPointer _ircInfoBox; QPointer _hmdToolsDialog; - QPointer _lodToolsDialog; QPointer _octreeStatsDialog; QPointer _testingDialog; QPointer _domainConnectionDialog; diff --git a/interface/src/ui/HMDToolsDialog.cpp b/interface/src/ui/HMDToolsDialog.cpp index 63794da60f..d3ff239553 100644 --- a/interface/src/ui/HMDToolsDialog.cpp +++ b/interface/src/ui/HMDToolsDialog.cpp @@ -83,9 +83,6 @@ HMDToolsDialog::HMDToolsDialog(QWidget* parent) : if (dialogsManager->getOctreeStatsDialog()) { watchWindow(dialogsManager->getOctreeStatsDialog()->windowHandle()); } - if (dialogsManager->getLodToolsDialog()) { - watchWindow(dialogsManager->getLodToolsDialog()->windowHandle()); - } connect(_switchModeButton, &QPushButton::clicked, [this]{ toggleHMDMode(); diff --git a/interface/src/ui/LodToolsDialog.cpp b/interface/src/ui/LodToolsDialog.cpp deleted file mode 100644 index 71e5293f30..0000000000 --- a/interface/src/ui/LodToolsDialog.cpp +++ /dev/null @@ -1,133 +0,0 @@ -// -// LodToolsDialog.cpp -// interface/src/ui -// -// Created by Brad Hefta-Gaub on 7/19/13. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "LodToolsDialog.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "Menu.h" - - -LodToolsDialog::LodToolsDialog(QWidget* parent) : - QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint) -{ - this->setWindowTitle("LOD Tools"); - auto lodManager = DependencyManager::get(); - - // Create layouter - QFormLayout* form = new QFormLayout(this); - - // Create a label with feedback... - _feedback = new QLabel(this); - QPalette palette = _feedback->palette(); - const unsigned redish = 0xfff00000; - palette.setColor(QPalette::WindowText, QColor::fromRgb(redish)); - _feedback->setPalette(palette); - _feedback->setText(lodManager->getLODFeedbackText()); - const int FEEDBACK_WIDTH = 350; - _feedback->setFixedWidth(FEEDBACK_WIDTH); - form->addRow("You can see... ", _feedback); - - form->addRow("Manually Adjust Level of Detail:", _manualLODAdjust = new QCheckBox(this)); - _manualLODAdjust->setChecked(!lodManager->getAutomaticLODAdjust()); - connect(_manualLODAdjust, SIGNAL(toggled(bool)), SLOT(updateAutomaticLODAdjust())); - - _lodSize = new QSlider(Qt::Horizontal, this); - const int MAX_LOD_SIZE = 2000; // ~20:4 vision -- really good. - const int MIN_LOD_SIZE = 5; // ~20:1600 vision -- really bad! - const int STEP_LOD_SIZE = 1; - const int PAGE_STEP_LOD_SIZE = 100; - const int SLIDER_WIDTH = 300; - _lodSize->setMaximum(MAX_LOD_SIZE); - _lodSize->setMinimum(MIN_LOD_SIZE); - _lodSize->setSingleStep(STEP_LOD_SIZE); - _lodSize->setTickInterval(PAGE_STEP_LOD_SIZE); - _lodSize->setTickPosition(QSlider::TicksBelow); - _lodSize->setFixedWidth(SLIDER_WIDTH); - _lodSize->setPageStep(PAGE_STEP_LOD_SIZE); - int sliderValue = lodManager->getOctreeSizeScale() / TREE_SCALE; - _lodSize->setValue(sliderValue); - form->addRow("Level of Detail:", _lodSize); - connect(_lodSize,SIGNAL(valueChanged(int)),this,SLOT(sizeScaleValueChanged(int))); - - // Add a button to reset - QPushButton* resetButton = new QPushButton("Reset", this); - form->addRow("", resetButton); - connect(resetButton, SIGNAL(clicked(bool)), this, SLOT(resetClicked(bool))); - - this->QDialog::setLayout(form); - - updateAutomaticLODAdjust(); -} - -void LodToolsDialog::reloadSliders() { - auto lodManager = DependencyManager::get(); - _lodSize->setValue(lodManager->getOctreeSizeScale() / TREE_SCALE); - _feedback->setText(lodManager->getLODFeedbackText()); -} - -void LodToolsDialog::updateAutomaticLODAdjust() { - auto lodManager = DependencyManager::get(); - lodManager->setAutomaticLODAdjust(!_manualLODAdjust->isChecked()); - _lodSize->setEnabled(_manualLODAdjust->isChecked()); -} - -void LodToolsDialog::sizeScaleValueChanged(int value) { - auto lodManager = DependencyManager::get(); - float realValue = value * TREE_SCALE; - lodManager->setOctreeSizeScale(realValue); - - _feedback->setText(lodManager->getLODFeedbackText()); -} - -void LodToolsDialog::resetClicked(bool checked) { - - int sliderValue = DEFAULT_OCTREE_SIZE_SCALE / TREE_SCALE; - _lodSize->setValue(sliderValue); - _manualLODAdjust->setChecked(false); - - updateAutomaticLODAdjust(); // tell our LOD manager about the reset -} - -void LodToolsDialog::reject() { - // Just regularly close upon ESC - this->QDialog::close(); -} - -void LodToolsDialog::closeEvent(QCloseEvent* event) { - this->QDialog::closeEvent(event); - emit closed(); - -#if RESET_TO_AUTOMATIC_WHEN_YOU_CLOSE_THE_DIALOG_BOX - auto lodManager = DependencyManager::get(); - - // always revert back to automatic LOD adjustment when closed - lodManager->setAutomaticLODAdjust(true); - - // if the user adjusted the LOD above "normal" then always revert back to default - if (lodManager->getOctreeSizeScale() > DEFAULT_OCTREE_SIZE_SCALE) { - lodManager->setOctreeSizeScale(DEFAULT_OCTREE_SIZE_SCALE); - } -#endif -} - - diff --git a/interface/src/ui/LodToolsDialog.h b/interface/src/ui/LodToolsDialog.h deleted file mode 100644 index b2390a1cd7..0000000000 --- a/interface/src/ui/LodToolsDialog.h +++ /dev/null @@ -1,55 +0,0 @@ -// -// LodToolsDialog.h -// interface/src/ui -// -// Created by Brad Hefta-Gaub on 7/19/13. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_LodToolsDialog_h -#define hifi_LodToolsDialog_h - -#include - -class QCheckBox; -class QDoubleSpinBox; -class QLabel; -class QSlider; - -class LodToolsDialog : public QDialog { - Q_OBJECT -public: - // Sets up the UI - LodToolsDialog(QWidget* parent); - -signals: - void closed(); - -public slots: - void reject() override; - void sizeScaleValueChanged(int value); - void resetClicked(bool checked); - void reloadSliders(); - void updateAutomaticLODAdjust(); - -protected: - - // Emits a 'closed' signal when this dialog is closed. - void closeEvent(QCloseEvent* event) override; - -private: - QSlider* _lodSize; - - QCheckBox* _manualLODAdjust; - - QDoubleSpinBox* _desktopLODDecreaseFPS; - - QDoubleSpinBox* _hmdLODDecreaseFPS; - - QLabel* _feedback; -}; - -#endif // hifi_LodToolsDialog_h diff --git a/interface/src/ui/PreferencesDialog.cpp b/interface/src/ui/PreferencesDialog.cpp index 905991834d..a1b2c93adc 100644 --- a/interface/src/ui/PreferencesDialog.cpp +++ b/interface/src/ui/PreferencesDialog.cpp @@ -73,9 +73,12 @@ void setupPreferences() { // Graphics quality static const QString GRAPHICS_QUALITY { "Graphics Quality" }; { - auto getter = []()->float { return DependencyManager::get()->getLODLevel(); }; - auto setter = [](float value) { }; - preferences->addPreference(new SliderPreference(GRAPHICS_QUALITY, "World Detail", getter, setter)); + auto getter = []()->float { return DependencyManager::get()->getOctreeSizeScale()/TREE_SCALE; }; + auto setter = [](float value) { DependencyManager::get()->setOctreeSizeScale(value*TREE_SCALE); }; + auto wodSlider = new SliderPreference(GRAPHICS_QUALITY, "World Detail", getter, setter); + wodSlider->setMin(0); + wodSlider->setMax(2000); + preferences->addPreference(wodSlider); auto getterSQ = []()->float { return 1.0; }; auto setterSQ = [](float value) { }; preferences->addPreference(new SliderPreference(GRAPHICS_QUALITY, "Shadow Quality", getterSQ, setterSQ));