void LLPanelEmerald::onClickBoobReset(void* data)
{
	LLPanelEmerald* self = (LLPanelEmerald*)data;
	LLControlVariable *var;

	var = self->findControl("EmeraldBoobMass");
	self->getChild<LLSliderCtrl>("EmeraldBoobMass")->setValue(var->getDefault());
	var->resetToDefault();

	var = self->findControl("EmeraldBoobHardness");
	self->getChild<LLSliderCtrl>("EmeraldBoobHardness")->setValue(var->getDefault());
	var->resetToDefault();

	var = self->findControl("EmeraldBoobVelMax");
	self->getChild<LLSliderCtrl>("EmeraldBoobVelMax")->setValue(var->getDefault());
	var->resetToDefault();

	var = self->findControl("EmeraldBoobFriction");
	self->getChild<LLSliderCtrl>("EmeraldBoobFriction")->setValue(var->getDefault());
	var->resetToDefault();

	var = self->findControl("EmeraldBoobVelMin");
	self->getChild<LLSliderCtrl>("EmeraldBoobVelMin")->setValue(var->getDefault());
	var->resetToDefault();
}
Esempio n. 2
0
// static
void LLPanelNetwork::onClickSearchDefault(void* user_data)
{
	LLPanelNetwork* self = (LLPanelNetwork*)user_data;
	LLControlVariable* controlp = 
		(gHippoGridManager->getConnectedGrid()->isSecondLife()) 
		? 
		gSavedSettings.getControl("SearchURLQuery")
		:
		gSavedSettings.getControl("SearchURLQueryOpenSim");

	if (controlp)
	{
		self->childSetValue("world_search_editor",controlp->getDefault().asString()) ;
	}
	else
	{
		llwarns << "SearchURLQuery or SearchURLQueryOpenSim missing from settings.xml - thats bad!" << llendl;
	}
}
Esempio n. 3
0
void LLControlGroup::connectCOAVars(LLControlGroup &OtherGroup)
{
    LLControlVariable *pCOAVar = NULL;
    for (ctrl_name_table_t::iterator iter = mNameTable.begin();
            iter != mNameTable.end(); iter++)
    {
        if(iter->second->isCOA())
        {
            LLControlVariable *pParent = iter->second;
            LLControlVariable *pChild = OtherGroup.getControl(pParent->getName());
            if(!pChild)
            {
                OtherGroup.declareControl(
                    pParent->getName(),
                    pParent->type(),
                    pParent->getDefault(),
                    pParent->getComment(),
                    pParent->isPersisted(),
                    true);

                pChild = OtherGroup.getControl(pParent->getName());
            }
            if(pChild)
            {
                pParent->setCOAConnect(pChild,true);
                pChild->setCOAConnect(pParent,false);
            }
        }
        else if(iter->second->getName() == "AscentStoreSettingsPerAccount")
            pCOAVar = iter->second;
    }
    if(pCOAVar)
    {
        pCOAVar->getSignal()->connect(boost::bind(&LLControlGroup::handleCOASettingChange, this, _2));
        pCOAVar->firePropertyChanged();
    }
}