void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te, void *data ) { LLFloaterColorPicker* self = (LLFloaterColorPicker*)data; if (self) { self->setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]); if (self->mApplyImmediateCheck->get()) { LLColorSwatchCtrl::onColorChanged ( self->getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); } } }
void LLColorSwatchCtrl::set(const LLColor4& color, BOOL update_picker, BOOL from_event) { mColor = color; LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); if (pickerp && update_picker) { pickerp->setCurRgb(mColor.mV[VRED], mColor.mV[VGREEN], mColor.mV[VBLUE]); } if (!from_event) { setControlValue(mColor.getValue()); } }