aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterwindlight.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterwindlight.cpp58
1 files changed, 56 insertions, 2 deletions
diff --git a/linden/indra/newview/llfloaterwindlight.cpp b/linden/indra/newview/llfloaterwindlight.cpp
index be3c1fd..4937232 100644
--- a/linden/indra/newview/llfloaterwindlight.cpp
+++ b/linden/indra/newview/llfloaterwindlight.cpp
@@ -63,6 +63,9 @@
63#include "llwlparamset.h" 63#include "llwlparamset.h"
64#include "llwlparammanager.h" 64#include "llwlparammanager.h"
65#include "llpostprocess.h" 65#include "llpostprocess.h"
66#include "wlfloaterwindlightsend.h"
67#include "llworld.h"
68#include "hippolimits.h"
66 69
67#undef max 70#undef max
68 71
@@ -216,7 +219,9 @@ void LLFloaterWindLight::initCallbacks(void) {
216 childSetCommitCallback("WLCloudScrollX", onCloudScrollXMoved, NULL); 219 childSetCommitCallback("WLCloudScrollX", onCloudScrollXMoved, NULL);
217 childSetCommitCallback("WLCloudScrollY", onCloudScrollYMoved, NULL); 220 childSetCommitCallback("WLCloudScrollY", onCloudScrollYMoved, NULL);
218 childSetCommitCallback("WLDistanceMult", onFloatControlMoved, &param_mgr->mDistanceMult); 221 childSetCommitCallback("WLDistanceMult", onFloatControlMoved, &param_mgr->mDistanceMult);
219 childSetCommitCallback("DrawClassicClouds", LLSavedSettingsGlue::setBOOL, (void*)"SkyUseClassicClouds"); 222 childSetCommitCallback("DrawClassicClouds", onCloudDrawToggled, NULL);
223 childSetCommitCallback("WLCloudHeight", onCloudHeightMoved, NULL);
224 childSetCommitCallback("WLCloudRange", onCloudRangeMoved, NULL);
220 225
221 // WL Top 226 // WL Top
222 childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL); 227 childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL);
@@ -425,7 +430,21 @@ void LLFloaterWindLight::syncMenu()
425 bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY(); 430 bool lockY = !param_mgr->mCurParams.getEnableCloudScrollY();
426 childSetValue("WLCloudLockX", lockX); 431 childSetValue("WLCloudLockX", lockX);
427 childSetValue("WLCloudLockY", lockY); 432 childSetValue("WLCloudLockY", lockY);
428 childSetValue("DrawClassicClouds", gSavedSettings.getBOOL("SkyUseClassicClouds")); 433 childSetValue("DrawClassicClouds", gHippoLimits->skyUseClassicClouds);
434
435 childSetValue("WLCloudHeight", gSavedSettings.getF32("ClassicCloudHeight"));
436 childSetValue("WLCloudRange", gSavedSettings.getF32("ClassicCloudRange"));
437
438 if(!gHippoLimits->skyUseClassicClouds)
439 {
440 childDisable("WLCloudHeight");
441 childDisable("WLCloudRange");
442 }
443 else
444 {
445 childEnable("WLCloudHeight");
446 childEnable("WLCloudRange");
447 }
429 448
430 // disable if locked, enable if not 449 // disable if locked, enable if not
431 if(lockX) 450 if(lockX)
@@ -874,6 +893,12 @@ void LLFloaterWindLight::onSavePreset(LLUICtrl* ctrl, void* userData)
874 893
875 } 894 }
876 } 895 }
896 else if (ctrl->getValue().asString() == "send_to_server_item")
897 {
898 //Open the other box
899 WLFloaterWindLightSend::instance();
900 WLFloaterWindLightSend::instance()->open();
901 }
877 else 902 else
878 { 903 {
879 // check to see if it's a default and shouldn't be overwritten 904 // check to see if it's a default and shouldn't be overwritten
@@ -1046,6 +1071,35 @@ void LLFloaterWindLight::onCloudScrollYMoved(LLUICtrl* ctrl, void* userData)
1046 // *HACK all cloud scrolling is off by an additive of 10. 1071 // *HACK all cloud scrolling is off by an additive of 10.
1047 LLWLParamManager::instance()->mCurParams.setCloudScrollY(sldrCtrl->getValueF32() + 10.0f); 1072 LLWLParamManager::instance()->mCurParams.setCloudScrollY(sldrCtrl->getValueF32() + 10.0f);
1048} 1073}
1074void LLFloaterWindLight::onCloudDrawToggled(LLUICtrl* ctrl, void* userData)
1075{
1076 LLCheckBoxCtrl* cbCtrl = static_cast<LLCheckBoxCtrl*>(ctrl);
1077
1078 bool lock = cbCtrl->get();
1079 gHippoLimits->skyUseClassicClouds = lock;
1080
1081 LLWorld::getInstance()->rebuildClouds(gAgent.getRegion());
1082}
1083
1084void LLFloaterWindLight::onCloudHeightMoved(LLUICtrl* ctrl, void* userData)
1085{
1086 deactivateAnimator();
1087
1088 LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
1089
1090 gSavedSettings.setF32("ClassicCloudHeight", sldrCtrl->getValueF32());
1091
1092 LLWorld::getInstance()->rebuildClouds(gAgent.getRegion());
1093}
1094
1095void LLFloaterWindLight::onCloudRangeMoved(LLUICtrl* ctrl, void* userData)
1096{
1097 deactivateAnimator();
1098
1099 LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
1100
1101 gSavedSettings.setF32("ClassicCloudRange", sldrCtrl->getValueF32());
1102}
1049 1103
1050void LLFloaterWindLight::onCloudScrollXToggled(LLUICtrl* ctrl, void* userData) 1104void LLFloaterWindLight::onCloudScrollXToggled(LLUICtrl* ctrl, void* userData)
1051{ 1105{