예제 #1
0
void LLEnvManagerNew::setUserPrefs(
	const std::string& water_preset,
	const std::string& sky_preset,
	const std::string& day_cycle_preset,
	bool use_fixed_sky,
	// <FS:Ansariel> Allow interpolation
	//bool use_region_settings)
	bool use_region_settings,
	bool interpolate)
	// </FS:Ansariel>
{
	// operate on members directly to avoid side effects
	mUserPrefs.mWaterPresetName	= water_preset;
	mUserPrefs.mSkyPresetName	= sky_preset;
	mUserPrefs.mDayCycleName	= day_cycle_preset;

	mUserPrefs.mUseRegionSettings	= use_region_settings;
	mUserPrefs.mUseDayCycle			= !use_fixed_sky;

	saveUserPrefs();
	// <FS:Ansariel> Allow interpolation
	//updateManagersFromPrefs(false);
	updateManagersFromPrefs(interpolate);
	// </FS:Ansariel>
}
예제 #2
0
void LLEnvManagerNew::setUseDayCycle(const std::string& name)
{
	if (!LLDayCycleManager::instance().presetExists(name))
	{
		llwarns << "Invalid day cycle name passed" << llendl;
		return;
	}

	mUserPrefs.setUseDayCycle(name);
	saveUserPrefs();
	updateManagersFromPrefs(false);
}
예제 #3
0
void LLEnvManagerNew::setUseDayCycle(const std::string& name, bool interpolate /*= false*/)
{
	if (!LLDayCycleManager::instance().presetExists(name))
	{
		LL_WARNS() << "Invalid day cycle name passed" << LL_ENDL;
		return;
	}

	mUserPrefs.setUseDayCycle(name);
	saveUserPrefs();
	updateManagersFromPrefs(interpolate);
}
예제 #4
0
void LLEnvManagerNew::setUseSkyPreset(const std::string& name)
{
	// *TODO: make sure the preset exists.
	if (name.empty())
	{
		llwarns << "Empty sky preset name passed" << llendl;
		return;
	}

	mUserPrefs.setUseSkyPreset(name);
	saveUserPrefs();
	updateManagersFromPrefs(false);
}
예제 #5
0
void LLEnvManagerNew::setUseWaterPreset(const std::string& name, bool interpolate /*= false*/)
{
	// *TODO: make sure the preset exists.
	if (name.empty())
	{
		llwarns << "Empty water preset name passed" << llendl;
		return;
	}

	mUserPrefs.setUseWaterPreset(name);
	saveUserPrefs();
	updateManagersFromPrefs(interpolate);
}
예제 #6
0
void LLEnvManagerNew::setUseWaterPreset(const std::string& name)
{
    // *TODO: make sure the preset exists.
    if (name.empty())
    {
        LL_WARNS() << "Empty water preset name passed" << LL_ENDL;
        return;
    }

    mUserPrefs.setUseWaterPreset(name);
    saveUserPrefs();
    updateManagersFromPrefs(false);
}
예제 #7
0
void LLEnvManagerNew::setUseSkyPreset(const std::string& name, bool interpolate /*= false*/)
{
	// *TODO: make sure the preset exists.
	if (name.empty())
	{
		LL_WARNS() << "Empty sky preset name passed" << LL_ENDL;
		return;
	}

	mUserPrefs.setUseSkyPreset(name);
	saveUserPrefs();
	updateManagersFromPrefs(interpolate);
}
예제 #8
0
void LLEnvManagerNew::setUserPrefs(
	const std::string& water_preset,
	const std::string& sky_preset,
	const std::string& day_cycle_preset,
	bool use_fixed_sky,
	bool use_region_settings)
{
	// operate on members directly to avoid side effects
	mUserPrefs.mWaterPresetName	= water_preset;
	mUserPrefs.mSkyPresetName	= sky_preset;
	mUserPrefs.mDayCycleName	= day_cycle_preset;

	mUserPrefs.mUseRegionSettings	= use_region_settings;
	mUserPrefs.mUseDayCycle			= !use_fixed_sky;

	saveUserPrefs();
	updateManagersFromPrefs(false);
}
예제 #9
0
void LLEnvManagerNew::setUseRegionSettings(bool val)
{
	mUserPrefs.setUseRegionSettings(val);
	saveUserPrefs();
	updateManagersFromPrefs(false);
}
예제 #10
0
void LLEnvManagerNew::setUseRegionSettings(bool val, bool interpolate /*= false*/)
{
	mUserPrefs.setUseRegionSettings(val);
	saveUserPrefs();
	updateManagersFromPrefs(interpolate);
}