aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/wlfloatermanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/wlfloatermanager.cpp')
-rw-r--r--linden/indra/newview/wlfloatermanager.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/linden/indra/newview/wlfloatermanager.cpp b/linden/indra/newview/wlfloatermanager.cpp
index 63abe14..382244d 100644
--- a/linden/indra/newview/wlfloatermanager.cpp
+++ b/linden/indra/newview/wlfloatermanager.cpp
@@ -1,11 +1,11 @@
1/** 1/**
2* @file wlfloaterwindlightsend.cpp 2* @file wlfloaterwindlightsend.cpp
3* @brief WLFloaterWindLightSend class definition 3* @brief WLFloaterWindLightSend class definition
4* 4*
5* $LicenseInfo:firstyear=2007&license=viewergpl$ 5* $LicenseInfo:firstyear=2007&license=viewergpl$
6* 6*
7* Copyright (c) 2007-2009, Linden Research, Inc. 7* Copyright (c) 2007-2009, Linden Research, Inc.
8* 8*
9* Second Life Viewer Source Code 9* Second Life Viewer Source Code
10* The source code in this file ("Source Code") is provided by Linden Lab 10* The source code in this file ("Source Code") is provided by Linden Lab
11* to you under the terms of the GNU General Public License, version 2.0 11* to you under the terms of the GNU General Public License, version 2.0
@@ -13,17 +13,17 @@
13* ("Other License"), formally executed by you and Linden Lab. Terms of 13* ("Other License"), formally executed by you and Linden Lab. Terms of
14* the GPL can be found in doc/GPL-license.txt in this distribution, or 14* the GPL can be found in doc/GPL-license.txt in this distribution, or
15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16* 16*
17* There are special exceptions to the terms and conditions of the GPL as 17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception 18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or 19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at 20* online at
21* http://secondlifegrid.net/programs/open_source/licensing/flossexception 21* http://secondlifegrid.net/programs/open_source/licensing/flossexception
22* 22*
23* By copying, modifying or distributing this software, you acknowledge 23* By copying, modifying or distributing this software, you acknowledge
24* that you have read and understood your obligations described above, 24* that you have read and understood your obligations described above,
25* and agree to abide by those obligations. 25* and agree to abide by those obligations.
26* 26*
27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 27* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 28* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29* COMPLETENESS OR PERFORMANCE. 29* COMPLETENESS OR PERFORMANCE.
@@ -70,17 +70,17 @@
70#include "llviewerparcelmgr.h" 70#include "llviewerparcelmgr.h"
71#include "llparcel.h" 71#include "llparcel.h"
72#include "wlretrievesettings.h" 72#include "wlretrievesettings.h"
73#include "wlsettingsmanager.h" 73#include "llettherebelight.h"
74#include "wlfloaterwindlightsend.h" 74#include "wlfloaterwindlightsend.h"
75 75
76#undef max 76#undef max
77WLFloaterManager* WLFloaterManager::sWindLight; 77WLFloaterManager* WLFloaterManager::sWindLight;
78std::map<std::string, LLWLParamSet*> WLFloaterManager::mWLParamList; 78std::map<std::string, LLWLParamSet*> WLFloaterManager::mWLParamList;
79std::map<std::string, LLWaterParamSet*> WLFloaterManager::mWaterParamList; 79std::map<std::string, LLWaterParamSet*> WLFloaterManager::mWaterParamList;
80std::map<std::string, LLUUID*> WLFloaterManager::mWaterNormalParamList; 80std::map<std::string, LLUUID*> WLFloaterManager::mWaterNormalParamList;
81std::map<std::string, LLSD> WLFloaterManager::mMinAltParamList; 81std::map<std::string, LLSD> WLFloaterManager::mMinAltParamList;
82std::map<std::string, LLSD> WLFloaterManager::mMaxAltParamList; 82std::map<std::string, LLSD> WLFloaterManager::mMaxAltParamList;
83std::map<std::string, LLSD> WLFloaterManager::mFadeParamList; 83std::map<std::string, LLSD> WLFloaterManager::mFadeParamList;
84 84
85WLFloaterManager::WLFloaterManager() : LLFloater(std::string("windlight manager floater")) 85WLFloaterManager::WLFloaterManager() : LLFloater(std::string("windlight manager floater"))
86{ 86{
@@ -214,7 +214,7 @@ void WLFloaterManager::onShow(void* userData)
214 LLWaterParamSet* mWater = mgr->mWaterParamList[name]; 214 LLWaterParamSet* mWater = mgr->mWaterParamList[name];
215 LLUUID* mWaterNormal = mgr->mWaterNormalParamList[name]; 215 LLUUID* mWaterNormal = mgr->mWaterNormalParamList[name];
216 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL) 216 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL)
217 WLSettingsManager::Apply(mSky, mWater, mWaterNormal); 217 LightShare::applyMaybe(mWater, mWaterNormal, mSky);
218} 218}
219void WLFloaterManager::onSetToCurrent(void* userData) 219void WLFloaterManager::onSetToCurrent(void* userData)
220{ 220{
@@ -233,10 +233,10 @@ void WLFloaterManager::onSetToCurrent(void* userData)
233 if(name == "(Region Settings)") 233 if(name == "(Region Settings)")
234 { 234 {
235 type = 0; 235 type = 0;
236 } 236 }
237 237
238 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL) 238 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL)
239 WLFloaterWindLightSend::SendSettings(false, type, NULL, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal); 239 WLFloaterWindLightSend::SendSettings(false, type, NULL, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal);
240} 240}
241void WLFloaterManager::onRemove(void* userData) 241void WLFloaterManager::onRemove(void* userData)
242{ 242{
@@ -258,7 +258,7 @@ void WLFloaterManager::onRemove(void* userData)
258 } 258 }
259 259
260 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL) 260 if(mSky != NULL && mWater != NULL && mWaterNormal != NULL)
261 WLFloaterWindLightSend::SendSettings(true, type, false, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal); 261 WLFloaterWindLightSend::SendSettings(true, type, false, *mSky, *mWater, fade, minAlt, maxAlt, *mWaterNormal);
262} 262}
263 263
264 264
@@ -269,13 +269,12 @@ void WLFloaterManager::UpdateFloater()
269 LLComboBox* comboBox = mgr->getChild<LLComboBox>("WLSettingsCombo"); 269 LLComboBox* comboBox = mgr->getChild<LLComboBox>("WLSettingsCombo");
270 comboBox->clear(); 270 comboBox->clear();
271 comboBox->removeall(); 271 comboBox->removeall();
272 std::map<std::string, LLWLParamSet*>::iterator mIt = 272 std::map<std::string, LLWLParamSet*>::iterator mIt =
273 WLFloaterManager::instance()->mWLParamList.begin(); 273 WLFloaterManager::instance()->mWLParamList.begin();
274 for(; mIt != WLFloaterManager::instance()->mWLParamList.end(); mIt++) 274 for(; mIt != WLFloaterManager::instance()->mWLParamList.end(); mIt++)
275 { 275 {
276 comboBox->add(mIt->first); 276 comboBox->add(mIt->first);
277 } 277 }
278 //Reorder them 278 //Reorder them
279 comboBox->sortByName(); 279 comboBox->sortByName();
280} 280}
281