summaryrefslogtreecommitdiff
path: root/indra/newview/llenvmanager.h
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-06-10 18:21:32 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-06-10 18:21:32 +0300
commit0d1cc56eb128755ce9e63d8cdf852b0e3b6f4fb1 (patch)
tree29824e7840afc6a6730083d1885c4172cb9b5ee0 /indra/newview/llenvmanager.h
parenta7603c84879e7a2d0f72d64e5988aae332d463c1 (diff)
STORM-1279 FIXED Changing sky preset with a keyboard shortcut now updates the Environment Settings floater.
Changes: * Subscribed the floater to the "settings changed" signal of the environment manager. * Rewrote the floater to not modify settings only when the Save button is pressed. * Refactoring to eliminate code duplication.
Diffstat (limited to 'indra/newview/llenvmanager.h')
-rw-r--r--indra/newview/llenvmanager.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h
index 4d7c0fe5e4..343416634c 100644
--- a/indra/newview/llenvmanager.h
+++ b/indra/newview/llenvmanager.h
@@ -267,6 +267,7 @@ class LLEnvManagerNew : public LLSingleton<LLEnvManagerNew>
{
LOG_CLASS(LLEnvManagerNew);
public:
+ typedef boost::signals2::signal<void()> prefs_change_signal_t;
typedef boost::signals2::signal<void()> region_settings_change_signal_t;
typedef boost::signals2::signal<void()> region_change_signal_t;
typedef boost::signals2::signal<void(bool)> region_settings_applied_signal_t;
@@ -295,31 +296,34 @@ public:
// Change environment w/o changing user preferences.
bool usePrefs();
bool useDefaults();
+ bool useRegionSettings();
bool useWaterPreset(const std::string& name);
bool useWaterParams(const LLSD& params);
+ bool useSkyPreset(const std::string& name);
bool useSkyParams(const LLSD& params);
bool useDayCycle(const std::string& name, LLEnvKey::EScope scope);
- bool useDayCycleParams(const LLSD& params, LLEnvKey::EScope scope);
+ bool useDayCycleParams(const LLSD& params, LLEnvKey::EScope scope, F32 time = 0.5);
// setters for user env. preferences
void setUseRegionSettings(bool val);
void setUseWaterPreset(const std::string& name);
void setUseSkyPreset(const std::string& name);
void setUseDayCycle(const std::string& name);
-
- // Preferences manipulation.
void 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);
+
+ // debugging methods
void dumpUserPrefs();
void dumpPresets();
// Misc.
void requestRegionSettings();
bool sendRegionSettings(const LLEnvironmentSettings& new_settings);
+ boost::signals2::connection setPreferencesChangeCallback(const prefs_change_signal_t::slot_type& cb);
boost::signals2::connection setRegionSettingsChangeCallback(const region_settings_change_signal_t::slot_type& cb);
boost::signals2::connection setRegionChangeCallback(const region_change_signal_t::slot_type& cb);
boost::signals2::connection setRegionSettingsAppliedCallback(const region_settings_applied_signal_t::slot_type& cb);
@@ -339,10 +343,21 @@ private:
void loadUserPrefs();
void saveUserPrefs();
+ void updateSkyFromPrefs();
+ void updateWaterFromPrefs(bool interpolate);
void updateManagersFromPrefs(bool interpolate);
+ bool useRegionSky();
+ bool useRegionWater();
+
+ bool useDefaultSky();
+ bool useDefaultWater();
+
void onRegionChange(bool interpolate);
+ /// Emitted when user environment preferences change.
+ prefs_change_signal_t mUsePrefsChangeSignal;
+
/// Emitted when region environment settings update comes.
region_settings_change_signal_t mRegionSettingsChangeSignal;