diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-05-08 07:43:08 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-05-08 07:43:08 +0000 |
commit | a4000c3744e42fcbb638e742f3b63fa31a0dee15 (patch) | |
tree | 7f472c30e65bbfa04ee9bc06631a1af305cc31fb /indra/newview/llpanelvolume.cpp | |
parent | 6c4cadbb04d633ad7b762058bdeba6e1f650dafd (diff) |
merge trunk@116587 skinning-7@119389 -> viewer-2.0.0-skinning-7
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r-- | indra/newview/llpanelvolume.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 6d014a23de..1e44a294b0 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -107,8 +107,8 @@ BOOL LLPanelVolume::postBuild() childSetCommitCallback("Light Checkbox Ctrl",onCommitIsLight,this); LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); if(LightColorSwatch){ - LightColorSwatch->setOnCancelCallback(onLightCancelColor); - LightColorSwatch->setOnSelectCallback(onLightSelectColor); + LightColorSwatch->setOnCancelCallback(boost::bind(&LLPanelVolume::onLightCancelColor, this, _2)); + LightColorSwatch->setOnSelectCallback(boost::bind(&LLPanelVolume::onLightSelectColor, this, _2)); childSetCommitCallback("colorswatch",onCommitLight,this); } childSetCommitCallback("Light Intensity",onCommitLight,this); @@ -125,8 +125,8 @@ BOOL LLPanelVolume::postBuild() return TRUE; } -LLPanelVolume::LLPanelVolume(const std::string& name) - : LLPanel(name) +LLPanelVolume::LLPanelVolume() + : LLPanel() { setMouseOpaque(FALSE); @@ -317,7 +317,7 @@ void LLPanelVolume::getState( ) } // static -BOOL LLPanelVolume::precommitValidate( LLUICtrl* ctrl, void* userdata ) +bool LLPanelVolume::precommitValidate( const LLSD& data ) { // TODO: Richard will fill this in later. return TRUE; // FALSE means that validation failed and new value should not be commited. @@ -427,21 +427,19 @@ void LLPanelVolume::sendIsFlexible() llinfos << "update flexible sent" << llendl; } -void LLPanelVolume::onLightCancelColor(LLUICtrl* ctrl, void* userdata) +void LLPanelVolume::onLightCancelColor(const LLSD& data) { - LLPanelVolume* self = (LLPanelVolume*) userdata; - LLColorSwatchCtrl* LightColorSwatch = self->getChild<LLColorSwatchCtrl>("colorswatch"); + LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); if(LightColorSwatch) { - LightColorSwatch->setColor(self->mLightSavedColor); + LightColorSwatch->setColor(mLightSavedColor); } - onLightSelectColor(NULL, userdata); + onLightSelectColor(data); } -void LLPanelVolume::onLightSelectColor(LLUICtrl* ctrl, void* userdata) +void LLPanelVolume::onLightSelectColor(const LLSD& data) { - LLPanelVolume* self = (LLPanelVolume*) userdata; - LLViewerObject* objectp = self->mObject; + LLViewerObject* objectp = mObject; if (!objectp || (objectp->getPCode() != LL_PCODE_VOLUME)) { return; @@ -449,13 +447,13 @@ void LLPanelVolume::onLightSelectColor(LLUICtrl* ctrl, void* userdata) LLVOVolume *volobjp = (LLVOVolume *)objectp; - LLColorSwatchCtrl* LightColorSwatch = self->getChild<LLColorSwatchCtrl>("colorswatch"); + LLColorSwatchCtrl* LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch"); if(LightColorSwatch) { LLColor4 clr = LightColorSwatch->get(); LLColor3 clr3( clr ); volobjp->setLightColor(clr3); - self->mLightSavedColor = clr; + mLightSavedColor = clr; } } |