void LLWindlightRemoteCtrl::refreshPresets()
{
	// If we're teleporting or just logging in, no UI to refresh
	if (gViewerWindow->getShowProgress())
	{
		return;
	}

	LLComboBox*	presetsCombo = getChild<LLComboBox>("Presets", TRUE, TRUE);
	if (presetsCombo)
	{
		// snag current preset
		LLWLParamManager * param_mgr = LLWLParamManager::instance();
		LLWLParamSet& currentParams = param_mgr->mCurParams;
		
		// clear in case presets names have changed
		presetsCombo->clearRows();

		std::map<std::string, LLWLParamSet>::iterator mIt = 
			param_mgr->mParamList.begin();
		for(; mIt != param_mgr->mParamList.end(); mIt++) 
		{
			presetsCombo->add(mIt->first);
		}
		
		// insert separator and add World menu options
		// presetsCombo->addSeparator(ADD_BOTTOM);
		// presetsCombo->addSimpleElement(getString("atmosphere"), ADD_BOTTOM);
		// presetsCombo->addSimpleElement(getString("lighting"), ADD_BOTTOM);
		// presetsCombo->addSimpleElement(getString("clouds"), ADD_BOTTOM);
		// presetsCombo->addSimpleElement(getString("advanced_water"), ADD_BOTTOM);
		presetsCombo->addSeparator(ADD_BOTTOM);
		presetsCombo->addSimpleElement(getString("sunrise"), ADD_BOTTOM);
		presetsCombo->addSimpleElement(getString("noon"), ADD_BOTTOM);
		presetsCombo->addSimpleElement(getString("sunset"), ADD_BOTTOM);
		presetsCombo->addSimpleElement(getString("midnight"), ADD_BOTTOM);
		presetsCombo->addSimpleElement(getString("revert_region"), ADD_BOTTOM);

		if (!currentParams.mName.empty())
		{
			presetsCombo->selectByValue(LLSD(currentParams.mName));
		}
		else
		{
			presetsCombo->selectByValue(LLSD("Default"));
		}
	}
}
Exemplo n.º 2
0
LLFloaterWater::LLFloaterWater() : LLFloater(std::string("water floater"))
{
	LLUICtrlFactory::getInstance()->buildFloater(this, "floater_water.xml");
	
	// add the combo boxes
	LLComboBox* comboBox = getChild<LLComboBox>("WaterPresetsCombo");

	if(comboBox != NULL) {
		
		std::map<std::string, LLWaterParamSet>::iterator mIt = 
			LLWaterParamManager::instance()->mParamList.begin();
		for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++) 
		{
			comboBox->add(mIt->first);
		}

		// set defaults on combo boxes
		comboBox->selectByValue(LLSD("Default"));
	}

	std::string def_water = getString("WLDefaultWaterNames");

	// no editing or deleting of the blank string
	sDefaultPresets.insert("");
	boost_tokenizer tokens(def_water, boost::char_separator<char>(":"));
	for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
	{
		std::string tok(*token_iter);
		sDefaultPresets.insert(tok);
	}

	// load it up
	initCallbacks();
}
Exemplo n.º 3
0
void LLFloaterDayCycle::onUseLindenTime(void* userData)
{
	LLFloaterWindLight* wl = LLFloaterWindLight::instance();
	LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo");
	box->selectByValue("");	

	LLWLParamManager::getInstance()->mAnimator.activate(LLWLAnimator::TIME_LINDEN);
	LLEnvManagerNew::instance().setUseDayCycle(LLEnvManagerNew::instance().getDayCycleName());
}
Exemplo n.º 4
0
void LLFloaterDayCycle::onUseLindenTime(void* userData)
{
	LLFloaterWindLight* wl = LLFloaterWindLight::instance();
	LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo");
	box->selectByValue("");	

	LLWLParamManager::instance()->mAnimator.mIsRunning = true;
	LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;	
}
Exemplo n.º 5
0
void LLFloaterDayCycle::onUseLindenTime(void* userData)
{
    LLFloaterWindLight* wl = LLFloaterWindLight::instance();
    LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo");
    box->selectByValue("");

    LLWLParamManager::instance()->mAnimator.mIsRunning = true;
    LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;
    //KC: reset last to Default
    gSavedPerAccountSettings.setString("PhoenixLastWLsetting", "Default");
}
Exemplo n.º 6
0
void LLFloaterEnvSettings::onUseEstateTime()
{
	LLFloaterWindLight* wl = LLFloaterReg::findTypedInstance<LLFloaterWindLight>("env_windlight");
	if(wl)
	{
		LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo");
		box->selectByValue("");
	}

	LLWLParamManager::instance()->mAnimator.mIsRunning = true;
	LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;
}
BOOL wlfPanel_AdvSettings::postBuild()
{
	childSetAction("expand", onClickExpandBtn, this);
	
	LLComboBox* comboBoxSky = getChild<LLComboBox>("WLSkyPresetsCombo");
	if(comboBoxSky != NULL) 
	{
		std::map<std::string, LLWLParamSet>::iterator mIt = LLWLParamManager::instance()->mParamList.begin();
		for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++) 
		{
			if (mIt->first.length() > 0)
				comboBoxSky->add(mIt->first);
		}
		comboBoxSky->add(LLStringUtil::null);
		comboBoxSky->selectByValue(LLSD(current_preset));
	}
	comboBoxSky->setCommitCallback(onChangePresetName);

	LLComboBox* comboBoxWater = getChild<LLComboBox>("WLWaterPresetsCombo");
	if(comboBoxWater != NULL) 
	{
		std::map<std::string, LLWaterParamSet>::iterator mIt = LLWaterParamManager::instance()->mParamList.begin();
		for(; mIt != LLWaterParamManager::instance()->mParamList.end(); mIt++) 
		{
			if (mIt->first.length() > 0)
				comboBoxWater->add(mIt->first);
		}
		comboBoxWater->add(LLStringUtil::null);
		comboBoxWater->selectByValue(LLSD(current_preset));
	}
	comboBoxWater->setCommitCallback(onChangePresetName);
	fixPointer = this;
	/*onClickExpandBtn(fixPointer);
	onClickExpandBtn(fixPointer);*/

	LLSliderCtrl* mCtrlSliderQuality = getChild<LLSliderCtrl>("QualityPerformanceSelection");
	mCtrlSliderQuality->setSliderMouseUpCallback(onChangeQuality);
	mCtrlSliderQuality->setCallbackUserData(this);
	return TRUE;
}
Exemplo n.º 8
0
void LLFloaterEnvSettings::onUseEstateTime(void* userData)
{
	if(LLFloaterWindLight::isOpen())
	{
		// select the blank value in 
		LLFloaterWindLight* wl = LLFloaterWindLight::instance();
		LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo");
		box->selectByValue("");
	}

	LLWLParamManager::instance()->mAnimator.activate(LLWLAnimator::TIME_LINDEN);
	LLEnvManagerNew::instance().setUseDayCycle(LLEnvManagerNew::instance().getDayCycleName());
}
void LLFloaterEnvSettings::onUseEstateTime(void* userData)
{
	if(LLFloaterWindLight::isOpen())
	{
		// select the blank value in 
		LLFloaterWindLight* wl = LLFloaterWindLight::instance();
		LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo");
		box->selectByValue("");
	}

	LLWLParamManager::instance()->mAnimator.mIsRunning = true;
	LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;
}
Exemplo n.º 10
0
BOOL LLFloaterAO::SetDefault(void* userdata, LLUUID ao_id, std::string defaultanim)
{
	if (sInstance && (userdata))
	{
		LLComboBox *box = (LLComboBox *) userdata;
		if (LLUUID::null == ao_id)
		{
			box->clear();
			box->removeall();
		}
		else
		{
			box->selectByValue(defaultanim);
		}
	}
	return TRUE;
}
Exemplo n.º 11
0
void LLFloaterPostProcess::syncMenu()
{
	// add the combo boxe contents
	LLComboBox* comboBox = getChild<LLComboBox>("PPEffectsCombo");

	comboBox->removeall();

	LLSD::map_const_iterator currEffect;
	for(currEffect = gPostProcess->mAllEffects.beginMap();
		currEffect != gPostProcess->mAllEffects.endMap();
		++currEffect) 
	{
		comboBox->add(currEffect->first);
	}

	// set the current effect as selected.
	comboBox->selectByValue(gPostProcess->getSelectedEffect());

	/// Sync Color Filter Menu
	childSetValue("ColorFilterToggle", gPostProcess->tweaks.useColorFilter());
	childSetValue("ColorFilterGamma", gPostProcess->tweaks.getGamma());
	childSetValue("ColorFilterBrightness", gPostProcess->tweaks.brightness());
	childSetValue("ColorFilterSaturation", gPostProcess->tweaks.saturation());
	childSetValue("ColorFilterContrast", gPostProcess->tweaks.contrast());
	childSetValue("ColorFilterBaseR", gPostProcess->tweaks.contrastBaseR());
	childSetValue("ColorFilterBaseG", gPostProcess->tweaks.contrastBaseG());
	childSetValue("ColorFilterBaseB", gPostProcess->tweaks.contrastBaseB());
	childSetValue("ColorFilterBaseI", gPostProcess->tweaks.contrastBaseIntensity());
	
	/// Sync Night Vision Menu
	childSetValue("NightVisionToggle", gPostProcess->tweaks.useNightVisionShader());
	childSetValue("NightVisionBrightMult", gPostProcess->tweaks.brightMult());
	childSetValue("NightVisionNoiseSize", gPostProcess->tweaks.noiseSize());
	childSetValue("NightVisionNoiseStrength", gPostProcess->tweaks.noiseStrength());

	/// Sync Bloom Menu
	/*childSetValue("BloomToggle", LLSD(gPostProcess->tweaks.useBloomShader()));
	childSetValue("BloomExtract", gPostProcess->tweaks.extractLow());
	childSetValue("BloomSize", gPostProcess->tweaks.bloomWidth());
	childSetValue("BloomStrength", gPostProcess->tweaks.bloomStrength());*/

	childSetValue("GaussBlurToggle", gPostProcess->tweaks.useGaussBlurFilter());
	childSetValue("GaussBlurPasses", gPostProcess->tweaks.getGaussBlurPasses());
}
BOOL wlfPanel_AdvSettings::postBuild()
{
	childSetAction("expand", onClickExpandBtn, this);
	
	LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
	if(comboBox != NULL) {
		std::map<std::string, LLWLParamSet>::iterator mIt = 
			LLWLParamManager::instance()->mParamList.begin();
		for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++) 
		{
			comboBox->add(mIt->first);
		}
		comboBox->add(LLStringUtil::null);
		comboBox->selectByValue(LLSD("Default"));
	}
	comboBox->setCommitCallback(onChangePresetName);
	fixPointer = this;
	return TRUE;
}
Exemplo n.º 13
0
void LLFloaterDayCycle::onKeyTimeMoved(LLUICtrl* ctrl, void* userData)
{
	LLComboBox* comboBox = sDayCycle->getChild<LLComboBox>("WLKeyPresets");
	LLMultiSliderCtrl* sldr = sDayCycle->getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
	LLSpinCtrl* hourSpin = sDayCycle->getChild<LLSpinCtrl>("WLCurKeyHour");
	LLSpinCtrl* minSpin = sDayCycle->getChild<LLSpinCtrl>("WLCurKeyMin");

	if(sldr->getValue().size() == 0) {
		return;
	}

	// make sure we have a slider
	const std::string& curSldr = sldr->getCurSlider();
	if(curSldr == "") {
		return;
	}

	F32 time = sldr->getCurSliderValue();

	// check to see if a key exists
	std::string presetName = sSliderToKey[curSldr].presetName;
	sSliderToKey[curSldr].time = time;

	// if it exists, turn on check box
	comboBox->selectByValue(presetName);

	// now set the spinners
	F32 hour = (F32)((S32)time);
	F32 min = (time - hour) * 60;

	// handle imprecision
	if(min >= 59) {
		min = 0;
		hour += 1;
	}

	hourSpin->set(hour);
	minSpin->set(min);

	syncTrack();

}
Exemplo n.º 14
0
BOOL LLFloaterWindLight::postBuild()
{
	// add the list of presets
	std::string def_days = getString("WLDefaultSkyNames");

	// no editing or deleting of the blank string
	sDefaultPresets.insert("");
	boost_tokenizer tokens(def_days, boost::char_separator<char>(":"));
	for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
	{
		std::string tok(*token_iter);
		sDefaultPresets.insert(tok);
	}

	// add the combo boxes
	LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");

	if(comboBox != NULL) {

		std::map<std::string, LLWLParamSet>::iterator mIt = 
			LLWLParamManager::instance()->mParamList.begin();
		for(; mIt != LLWLParamManager::instance()->mParamList.end(); mIt++) 
		{
			comboBox->add(mIt->first);
		}

		// entry for when we're in estate time
		comboBox->add(LLStringUtil::null);

		// set defaults on combo boxes
		comboBox->selectByValue(LLSD("Default"));
	}
	// load it up
	initCallbacks();

	syncMenu();
	
	return TRUE;
}
Exemplo n.º 15
0
void LLFloaterDayCycle::onDeleteKey(void* userData)
{
	if(sSliderToKey.size() == 0) {
		return;
	}

	LLComboBox* comboBox = sDayCycle->getChild<LLComboBox>( 
		"WLKeyPresets");
	LLMultiSliderCtrl* sldr = sDayCycle->getChild<LLMultiSliderCtrl>("WLDayCycleKeys");

	// delete from map
	const std::string& sldrName = sldr->getCurSlider();
	std::map<std::string, LLWLSkyKey>::iterator mIt = sSliderToKey.find(sldrName);
	sSliderToKey.erase(mIt);

	sldr->deleteCurSlider();

	if(sSliderToKey.size() == 0) {
		return;
	}

	const std::string& name = sldr->getCurSlider();
	comboBox->selectByValue(sSliderToKey[name].presetName);
	F32 time = sSliderToKey[name].time;

	LLSpinCtrl* hourSpin = sDayCycle->getChild<LLSpinCtrl>("WLCurKeyHour");
	LLSpinCtrl* minSpin = sDayCycle->getChild<LLSpinCtrl>("WLCurKeyMin");

	// now set the spinners
	F32 hour = (F32)((S32)time);
	F32 min = (time - hour) / 60;
	hourSpin->set(hour);
	minSpin->set(min);

	syncTrack();

}
void FSPanelLogin::addUsersToCombo(BOOL show_server)
{
	LLComboBox* combo = getChild<LLComboBox>("username_combo");
	if (!combo) return;
	
	combo->removeall();
	std::string current_creds=credentialName();
	if(current_creds.find("@") < 1)
	{
		current_creds = gSavedSettings.getString("UserLoginInfo");
	}
	
	std::vector<std::string> logins = gSecAPIHandler->listCredentials();
	LLUUID selectid;
	LLStringUtil::trim(current_creds);
	for (std::vector<std::string>::iterator login_choice = logins.begin();
		 login_choice != logins.end();
		 login_choice++)
	{
		std::string name = *login_choice;
		LLStringUtil::trim(name);
		
		std::string credname = name;
		std::string gridname = name;
		size_t arobase = gridname.find("@");
		if (arobase != std::string::npos && arobase + 1 < gridname.length() && arobase > 1)
		{
			gridname = gridname.substr(arobase + 1, gridname.length() - arobase - 1);
			name = name.substr(0,arobase);
			
			const std::string grid_label = LLGridManager::getInstance()->getGridLabel(gridname);
			
			bool add_grid = false;
			/// We only want to append a grid label when the user has enabled logging into other grids, or
			/// they are using the OpenSim build. That way users who only want Second Life Agni can remain
			/// blissfully ignorant. We will also not show them any saved credential that isn't Agni because
			/// they don't want them.
			if (SECOND_LIFE_MAIN_LABEL == grid_label)
			{
				if (show_server)
					name.append( " @ " + grid_label);
				add_grid = true;
			}
#ifdef OPENSIM
			else if (!grid_label.empty() && show_server)
			{
				name.append(" @ " + grid_label);
				add_grid = true;
			}
#else  // OPENSIM
			else if (SECOND_LIFE_BETA_LABEL == grid_label && show_server)
			{
				name.append(" @ " + grid_label);
				add_grid = true;
			}
#endif // OPENSIM
			if (add_grid)
			{
				combo->add(name,LLSD(credname));
			}
		}
	}
	combo->sortByName();
	combo->selectByValue(LLSD(current_creds));
}