diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llpanelvolume.cpp | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpanelvolume.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/linden/indra/newview/llpanelvolume.cpp b/linden/indra/newview/llpanelvolume.cpp index cad038c..285750a 100644 --- a/linden/indra/newview/llpanelvolume.cpp +++ b/linden/indra/newview/llpanelvolume.cpp | |||
@@ -104,7 +104,7 @@ BOOL LLPanelVolume::postBuild() | |||
104 | // LIGHT Parameters | 104 | // LIGHT Parameters |
105 | { | 105 | { |
106 | childSetCommitCallback("Light Checkbox Ctrl",onCommitIsLight,this); | 106 | childSetCommitCallback("Light Checkbox Ctrl",onCommitIsLight,this); |
107 | LLColorSwatchCtrl* LightColorSwatch = gUICtrlFactory->getColorSwatchByName(this,"colorswatch"); | 107 | LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); |
108 | if(LightColorSwatch){ | 108 | if(LightColorSwatch){ |
109 | LightColorSwatch->setOnCancelCallback(onLightCancelColor); | 109 | LightColorSwatch->setOnCancelCallback(onLightCancelColor); |
110 | LightColorSwatch->setOnSelectCallback(onLightSelectColor); | 110 | LightColorSwatch->setOnSelectCallback(onLightSelectColor); |
@@ -213,7 +213,7 @@ void LLPanelVolume::getState( ) | |||
213 | { | 213 | { |
214 | childSetEnabled("label color",true); | 214 | childSetEnabled("label color",true); |
215 | //mLabelColor ->setEnabled( TRUE ); | 215 | //mLabelColor ->setEnabled( TRUE ); |
216 | LLColorSwatchCtrl* LightColorSwatch = gUICtrlFactory->getColorSwatchByName(this,"colorswatch"); | 216 | LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); |
217 | if(LightColorSwatch) | 217 | if(LightColorSwatch) |
218 | { | 218 | { |
219 | LightColorSwatch->setEnabled( TRUE ); | 219 | LightColorSwatch->setEnabled( TRUE ); |
@@ -232,8 +232,12 @@ void LLPanelVolume::getState( ) | |||
232 | } | 232 | } |
233 | else | 233 | else |
234 | { | 234 | { |
235 | ((LLPanel *) getChildByName ("Light Intensity", true))->clear(); | ||
236 | ((LLPanel *) getChildByName ("Light Radius", true))->clear(); | ||
237 | ((LLPanel *) getChildByName ("Light Falloff", true))->clear(); | ||
238 | |||
235 | childSetEnabled("label color",false); | 239 | childSetEnabled("label color",false); |
236 | LLColorSwatchCtrl* LightColorSwatch = gUICtrlFactory->getColorSwatchByName(this,"colorswatch"); | 240 | LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); |
237 | if(LightColorSwatch) | 241 | if(LightColorSwatch) |
238 | { | 242 | { |
239 | LightColorSwatch->setEnabled( FALSE ); | 243 | LightColorSwatch->setEnabled( FALSE ); |
@@ -288,6 +292,15 @@ void LLPanelVolume::getState( ) | |||
288 | } | 292 | } |
289 | else | 293 | else |
290 | { | 294 | { |
295 | ((LLPanel *) getChildByName ("FlexNumSections", true))->clear(); | ||
296 | ((LLPanel *) getChildByName ("FlexGravity", true))->clear(); | ||
297 | ((LLPanel *) getChildByName ("FlexTension", true))->clear(); | ||
298 | ((LLPanel *) getChildByName ("FlexFriction", true))->clear(); | ||
299 | ((LLPanel *) getChildByName ("FlexWind", true))->clear(); | ||
300 | ((LLPanel *) getChildByName ("FlexForceX", true))->clear(); | ||
301 | ((LLPanel *) getChildByName ("FlexForceY", true))->clear(); | ||
302 | ((LLPanel *) getChildByName ("FlexForceZ", true))->clear(); | ||
303 | |||
291 | childSetEnabled("FlexNumSections",false); | 304 | childSetEnabled("FlexNumSections",false); |
292 | childSetEnabled("FlexGravity",false); | 305 | childSetEnabled("FlexGravity",false); |
293 | childSetEnabled("FlexTension",false); | 306 | childSetEnabled("FlexTension",false); |
@@ -342,7 +355,7 @@ void LLPanelVolume::clearCtrls() | |||
342 | childSetEnabled("Light Checkbox Ctrl",false); | 355 | childSetEnabled("Light Checkbox Ctrl",false); |
343 | childSetEnabled("label color",false); | 356 | childSetEnabled("label color",false); |
344 | childSetEnabled("label color",false); | 357 | childSetEnabled("label color",false); |
345 | LLColorSwatchCtrl* LightColorSwatch = gUICtrlFactory->getColorSwatchByName(this,"colorswatch"); | 358 | LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); |
346 | if(LightColorSwatch) | 359 | if(LightColorSwatch) |
347 | { | 360 | { |
348 | LightColorSwatch->setEnabled( FALSE ); | 361 | LightColorSwatch->setEnabled( FALSE ); |
@@ -416,7 +429,7 @@ void LLPanelVolume::sendIsFlexible() | |||
416 | void LLPanelVolume::onLightCancelColor(LLUICtrl* ctrl, void* userdata) | 429 | void LLPanelVolume::onLightCancelColor(LLUICtrl* ctrl, void* userdata) |
417 | { | 430 | { |
418 | LLPanelVolume* self = (LLPanelVolume*) userdata; | 431 | LLPanelVolume* self = (LLPanelVolume*) userdata; |
419 | LLColorSwatchCtrl* LightColorSwatch = gUICtrlFactory->getColorSwatchByName(self,"colorswatch"); | 432 | LLColorSwatchCtrl* LightColorSwatch = self->getChild<LLColorSwatchCtrl>("colorswatch"); |
420 | if(LightColorSwatch) | 433 | if(LightColorSwatch) |
421 | { | 434 | { |
422 | LightColorSwatch->setColor(self->mLightSavedColor); | 435 | LightColorSwatch->setColor(self->mLightSavedColor); |
@@ -435,7 +448,7 @@ void LLPanelVolume::onLightSelectColor(LLUICtrl* ctrl, void* userdata) | |||
435 | LLVOVolume *volobjp = (LLVOVolume *)objectp; | 448 | LLVOVolume *volobjp = (LLVOVolume *)objectp; |
436 | 449 | ||
437 | 450 | ||
438 | LLColorSwatchCtrl* LightColorSwatch = gUICtrlFactory->getColorSwatchByName(self,"colorswatch"); | 451 | LLColorSwatchCtrl* LightColorSwatch = self->getChild<LLColorSwatchCtrl>("colorswatch"); |
439 | if(LightColorSwatch) | 452 | if(LightColorSwatch) |
440 | { | 453 | { |
441 | LLColor4 clr = LightColorSwatch->get(); | 454 | LLColor4 clr = LightColorSwatch->get(); |
@@ -460,7 +473,7 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata ) | |||
460 | volobjp->setLightIntensity((F32)self->childGetValue("Light Intensity").asReal()); | 473 | volobjp->setLightIntensity((F32)self->childGetValue("Light Intensity").asReal()); |
461 | volobjp->setLightRadius((F32)self->childGetValue("Light Radius").asReal()); | 474 | volobjp->setLightRadius((F32)self->childGetValue("Light Radius").asReal()); |
462 | volobjp->setLightFalloff((F32)self->childGetValue("Light Falloff").asReal()); | 475 | volobjp->setLightFalloff((F32)self->childGetValue("Light Falloff").asReal()); |
463 | LLColorSwatchCtrl* LightColorSwatch = gUICtrlFactory->getColorSwatchByName(self,"colorswatch"); | 476 | LLColorSwatchCtrl* LightColorSwatch = self->getChild<LLColorSwatchCtrl>("colorswatch"); |
464 | if(LightColorSwatch) | 477 | if(LightColorSwatch) |
465 | { | 478 | { |
466 | LLColor4 clr = LightColorSwatch->get(); | 479 | LLColor4 clr = LightColorSwatch->get(); |