some settings cleanup, adding description to Send Data

This commit is contained in:
ZappoMan 2018-01-20 00:08:06 -08:00
parent a7b56da570
commit 027a1e69f4
2 changed files with 17 additions and 26 deletions

View file

@ -142,7 +142,10 @@ void setupPreferences() {
{ {
auto getter = []()->bool { return !Menu::getInstance()->isOptionChecked(MenuOption::DisableActivityLogger); }; auto getter = []()->bool { return !Menu::getInstance()->isOptionChecked(MenuOption::DisableActivityLogger); };
auto setter = [](bool value) { Menu::getInstance()->setIsOptionChecked(MenuOption::DisableActivityLogger, !value); }; auto setter = [](bool value) { Menu::getInstance()->setIsOptionChecked(MenuOption::DisableActivityLogger, !value); };
preferences->addPreference(new CheckPreference("Privacy", "Send data", getter, setter)); preferences->addPreference(new CheckPreference("Privacy", "Send data - High Fidelity uses information provided by your "
"client to improve the product through the logging of errors and tracking of usage patterns, "
"installation and system details, and crash events. By allowing High Fidelity to collect "
"this information you are helping to improve the product. ", getter, setter));
} }
static const QString LOD_TUNING("Level of Detail Tuning"); static const QString LOD_TUNING("Level of Detail Tuning");
@ -297,26 +300,6 @@ void setupPreferences() {
} }
#endif #endif
{
auto getter = []()->float { return qApp->getMaxOctreePacketsPerSecond(); };
auto setter = [](float value) { qApp->setMaxOctreePacketsPerSecond(value); };
auto preference = new SpinnerPreference("Octree", "Max packets sent each second", getter, setter);
preference->setMin(60);
preference->setMax(6000);
preference->setStep(10);
preferences->addPreference(preference);
}
{
auto getter = []()->float { return qApp->getApplicationCompositor().getHmdUIAngularSize(); };
auto setter = [](float value) { qApp->getApplicationCompositor().setHmdUIAngularSize(value); };
auto preference = new SpinnerPreference("HMD", "UI horizontal angular size (degrees)", getter, setter);
preference->setMin(30);
preference->setMax(160);
preference->setStep(1);
preferences->addPreference(preference);
}
{ {
static const QString RENDER("Graphics"); static const QString RENDER("Graphics");
@ -342,7 +325,7 @@ void setupPreferences() {
} }
} }
{ {
static const QString RENDER("Networking"); static const QString NETWORKING("Networking");
auto nodelist = DependencyManager::get<NodeList>(); auto nodelist = DependencyManager::get<NodeList>();
{ {
@ -350,10 +333,21 @@ void setupPreferences() {
static const int MAX_PORT_NUMBER { 65535 }; static const int MAX_PORT_NUMBER { 65535 };
auto getter = [nodelist] { return static_cast<int>(nodelist->getSocketLocalPort()); }; auto getter = [nodelist] { return static_cast<int>(nodelist->getSocketLocalPort()); };
auto setter = [nodelist](int preset) { nodelist->setSocketLocalPort(static_cast<quint16>(preset)); }; auto setter = [nodelist](int preset) { nodelist->setSocketLocalPort(static_cast<quint16>(preset)); };
auto preference = new IntSpinnerPreference(RENDER, "Listening Port", getter, setter); auto preference = new IntSpinnerPreference(NETWORKING, "Listening Port", getter, setter);
preference->setMin(MIN_PORT_NUMBER); preference->setMin(MIN_PORT_NUMBER);
preference->setMax(MAX_PORT_NUMBER); preference->setMax(MAX_PORT_NUMBER);
preferences->addPreference(preference); preferences->addPreference(preference);
} }
{
auto getter = []()->float { return qApp->getMaxOctreePacketsPerSecond(); };
auto setter = [](float value) { qApp->setMaxOctreePacketsPerSecond(value); };
auto preference = new SpinnerPreference(NETWORKING, "Max entities packets sent each second", getter, setter);
preference->setMin(60);
preference->setMax(6000);
preference->setStep(10);
preferences->addPreference(preference);
}
} }
} }

View file

@ -53,8 +53,6 @@ public:
bool calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction, glm::vec3& result) const; bool calculateRayUICollisionPoint(const glm::vec3& position, const glm::vec3& direction, glm::vec3& result) const;
float getHmdUIAngularSize() const { return _hmdUIAngularSize; }
void setHmdUIAngularSize(float hmdUIAngularSize) { _hmdUIAngularSize = hmdUIAngularSize; }
bool isHMD() const; bool isHMD() const;
bool fakeEventActive() const { return _fakeMouseEvent; } bool fakeEventActive() const { return _fakeMouseEvent; }
@ -139,7 +137,6 @@ private:
//quint64 _hoverItemEnterUsecs { 0 }; //quint64 _hoverItemEnterUsecs { 0 };
bool _isOverDesktop { true }; bool _isOverDesktop { true };
float _hmdUIAngularSize { glm::degrees(VIRTUAL_UI_TARGET_FOV.y) };
float _textureFov { VIRTUAL_UI_TARGET_FOV.y }; float _textureFov { VIRTUAL_UI_TARGET_FOV.y };
float _textureAspectRatio { VIRTUAL_UI_ASPECT_RATIO }; float _textureAspectRatio { VIRTUAL_UI_ASPECT_RATIO };