From ec749bb1c1fa143c6019791d6713d85f05510e53 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Tue, 17 May 2011 17:09:15 +0300 Subject: STORM-1244 FIXED Environment Settings floater implementation. --- indra/newview/llfloaterenvironmentsettings.h | 78 ++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 indra/newview/llfloaterenvironmentsettings.h (limited to 'indra/newview/llfloaterenvironmentsettings.h') diff --git a/indra/newview/llfloaterenvironmentsettings.h b/indra/newview/llfloaterenvironmentsettings.h new file mode 100644 index 0000000000..0953ab4a65 --- /dev/null +++ b/indra/newview/llfloaterenvironmentsettings.h @@ -0,0 +1,78 @@ +/** + * @file llfloaterenvironmentsettings.h + * @brief LLFloaterEnvironmentSettings class definition + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERENVIRONMENTSETTINGS_H +#define LL_LLFLOATERENVIRONMENTSETTINGS_H + +#include "llfloater.h" + +class LLComboBox; +class LLRadioGroup; + +class LLFloaterEnvironmentSettings : public LLFloater +{ + LOG_CLASS(LLFloaterEnvironmentSettings); + +public: + LLFloaterEnvironmentSettings(const LLSD &key); + /*virtual*/ ~LLFloaterEnvironmentSettings(); + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + +private: + void onSwitchRegionSettings(); + void onSwitchDayCycle(); + + void onSelectWaterPreset(); + void onSelectSkyPreset(); + void onSelectDayCyclePreset(); + + void onBtnOK(); + void onBtnCancel(); + + void cancel(); + + void populateWaterPresetsList(); + void populateSkyPresetsList(); + void populateDayCyclePresetsList(); + + LLRadioGroup* mRegionSettingsRadioGroup; + LLRadioGroup* mDayCycleSettingsRadioGroup; + + LLComboBox* mWaterPresetCombo; + LLComboBox* mSkyPresetCombo; + LLComboBox* mDayCyclePresetCombo; + + std::string mWaterPreset; + std::string mSkyPreset; + std::string mDayCyclePreset; + + bool mUseRegionSettings; + bool mUseFixedSky; + bool mDirty; +}; + +#endif // LL_LLFLOATERENVIRONMENTSETTINGS_H -- cgit v1.2.3 From 995a006b58f2be1d7236b32be3570b6d7250013b Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Wed, 1 Jun 2011 18:26:36 +0300 Subject: STORM-1253 WIP Update UI when a day cycle gets added or deleted. --- indra/newview/llfloaterenvironmentsettings.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llfloaterenvironmentsettings.h') diff --git a/indra/newview/llfloaterenvironmentsettings.h b/indra/newview/llfloaterenvironmentsettings.h index 0953ab4a65..6d29a5d4d5 100644 --- a/indra/newview/llfloaterenvironmentsettings.h +++ b/indra/newview/llfloaterenvironmentsettings.h @@ -50,6 +50,8 @@ private: void onSelectSkyPreset(); void onSelectDayCyclePreset(); + void onDayCycleListChange(); + void onBtnOK(); void onBtnCancel(); -- cgit v1.2.3 From 7151a4e6b02f02155387fc595034a42aebd7ec9c Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 7 Jun 2011 17:41:26 +0300 Subject: STORM-1255 WIP Consistency pass on sky presets removal. * Update all related floaters when a sky preset gets removed. * Don't allow removing skies referenced by (local) day cycles. * Other minor fixes. --- indra/newview/llfloaterenvironmentsettings.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llfloaterenvironmentsettings.h') diff --git a/indra/newview/llfloaterenvironmentsettings.h b/indra/newview/llfloaterenvironmentsettings.h index 6d29a5d4d5..0953ab4a65 100644 --- a/indra/newview/llfloaterenvironmentsettings.h +++ b/indra/newview/llfloaterenvironmentsettings.h @@ -50,8 +50,6 @@ private: void onSelectSkyPreset(); void onSelectDayCyclePreset(); - void onDayCycleListChange(); - void onBtnOK(); void onBtnCancel(); -- cgit v1.2.3 From 0d1cc56eb128755ce9e63d8cdf852b0e3b6f4fb1 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 10 Jun 2011 18:21:32 +0300 Subject: 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. --- indra/newview/llfloaterenvironmentsettings.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'indra/newview/llfloaterenvironmentsettings.h') diff --git a/indra/newview/llfloaterenvironmentsettings.h b/indra/newview/llfloaterenvironmentsettings.h index 0953ab4a65..0ab458a0f6 100644 --- a/indra/newview/llfloaterenvironmentsettings.h +++ b/indra/newview/llfloaterenvironmentsettings.h @@ -38,7 +38,6 @@ class LLFloaterEnvironmentSettings : public LLFloater public: LLFloaterEnvironmentSettings(const LLSD &key); - /*virtual*/ ~LLFloaterEnvironmentSettings(); /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); @@ -53,6 +52,8 @@ private: void onBtnOK(); void onBtnCancel(); + void refresh(); /// update controls with user prefs + void apply(); void cancel(); void populateWaterPresetsList(); @@ -65,14 +66,6 @@ private: LLComboBox* mWaterPresetCombo; LLComboBox* mSkyPresetCombo; LLComboBox* mDayCyclePresetCombo; - - std::string mWaterPreset; - std::string mSkyPreset; - std::string mDayCyclePreset; - - bool mUseRegionSettings; - bool mUseFixedSky; - bool mDirty; }; #endif // LL_LLFLOATERENVIRONMENTSETTINGS_H -- cgit v1.2.3