diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp
index ed36634b62..bddb70aa02 100644
--- a/apps/launcher/advancedpage.cpp
+++ b/apps/launcher/advancedpage.cpp
@@ -136,6 +136,7 @@ bool Launcher::AdvancedPage::loadSettings()
loadSettingBool(activeGridObjectPagingCheckBox, "object paging active grid", "Terrain");
viewingDistanceComboBox->setValue(convertToCells(Settings::Manager::getInt("viewing distance", "Camera")));
+ objectPagingMinSizeComboBox->setValue(Settings::Manager::getDouble("object paging min size", "Terrain"));
}
// Audio
@@ -287,6 +288,9 @@ void Launcher::AdvancedPage::saveSettings()
{
Settings::Manager::setInt("viewing distance", "Camera", convertToUnits(viewingDistance));
}
+ double objectPagingMinSize = objectPagingMinSizeComboBox->value();
+ if (objectPagingMinSize != Settings::Manager::getDouble("object paging min size", "Terrain"))
+ Settings::Manager::setDouble("object paging min size", "Terrain", objectPagingMinSize);
}
// Audio
diff --git a/components/settings/settings.cpp b/components/settings/settings.cpp
index 13501ac8c9..09a3d1f516 100644
--- a/components/settings/settings.cpp
+++ b/components/settings/settings.cpp
@@ -61,6 +61,15 @@ float Manager::getFloat (const std::string& setting, const std::string& category
return number;
}
+double Manager::getDouble (const std::string& setting, const std::string& category)
+{
+ const std::string& value = getString(setting, category);
+ std::stringstream stream(value);
+ double number = 0.0;
+ stream >> number;
+ return number;
+}
+
int Manager::getInt (const std::string& setting, const std::string& category)
{
const std::string& value = getString(setting, category);
@@ -128,6 +137,13 @@ void Manager::setFloat (const std::string &setting, const std::string &category,
setString(setting, category, stream.str());
}
+void Manager::setDouble (const std::string &setting, const std::string &category, const double value)
+{
+ std::ostringstream stream;
+ stream << value;
+ setString(setting, category, stream.str());
+}
+
void Manager::setBool(const std::string &setting, const std::string &category, const bool value)
{
setString(setting, category, value ? "true" : "false");
diff --git a/components/settings/settings.hpp b/components/settings/settings.hpp
index ecc5aa5fd3..e3a29d4c34 100644
--- a/components/settings/settings.hpp
+++ b/components/settings/settings.hpp
@@ -44,6 +44,7 @@ namespace Settings
static int getInt (const std::string& setting, const std::string& category);
static float getFloat (const std::string& setting, const std::string& category);
+ static double getDouble (const std::string& setting, const std::string& category);
static std::string getString (const std::string& setting, const std::string& category);
static bool getBool (const std::string& setting, const std::string& category);
static osg::Vec2f getVector2 (const std::string& setting, const std::string& category);
@@ -51,6 +52,7 @@ namespace Settings
static void setInt (const std::string& setting, const std::string& category, const int value);
static void setFloat (const std::string& setting, const std::string& category, const float value);
+ static void setDouble (const std::string& setting, const std::string& category, const double value);
static void setString (const std::string& setting, const std::string& category, const std::string& value);
static void setBool (const std::string& setting, const std::string& category, const bool value);
static void setVector2 (const std::string& setting, const std::string& category, const osg::Vec2f value);
diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui
index b9d5c7ef57..8abe8f59a4 100644
--- a/files/ui/advancedpage.ui
+++ b/files/ui/advancedpage.ui
@@ -478,6 +478,36 @@
-
+
+
-
+
+
+ <html><head/><body><p>Controls how large an object must be to be visible in the scene. The object’s size is divided by its distance to the camera and the result of the division is compared with this value. The smaller this value is, the more objects you will see in the scene.</p></body></html>
+
+
+ Object paging min size
+
+
+
+ -
+
+
+ 3
+
+
+ 0.000000000000000
+
+
+ 0.250000000000000
+
+
+ 0.005000000000000
+
+
+
+
+
+ -
<html><head/><body><p>If true, use paging and LOD algorithms to display the entire terrain. If false, only display terrain of the loaded cells.</p></body></html>
@@ -487,7 +517,7 @@
- -
+
-
20