summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2011-05-17 17:09:15 +0300
committerSeth ProductEngine <slitovchuk@productengine.com>2011-05-17 17:09:15 +0300
commitec749bb1c1fa143c6019791d6713d85f05510e53 (patch)
tree2081fcb35d67cbc1c9de99865a28eb60a4e4b8fb /indra
parent53d09e7451b89a1c050f3237e6eb5c5ef3b116fc (diff)
STORM-1244 FIXED Environment Settings floater implementation.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/llenvmanager.cpp20
-rw-r--r--indra/newview/llenvmanager.h6
-rw-r--r--indra/newview/llfloaterenvironmentsettings.cpp209
-rw-r--r--indra/newview/llfloaterenvironmentsettings.h78
-rw-r--r--indra/newview/llviewerfloaterreg.cpp4
-rw-r--r--indra/newview/llviewermenu.cpp42
-rw-r--r--indra/newview/llwlparammanager.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_environment_settings.xml131
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml32
10 files changed, 398 insertions, 128 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 45bb07acfa..81caf9fbd4 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -175,6 +175,7 @@ set(viewer_SOURCE_FILES
llfloaterdaycycle.cpp
llfloaterdisplayname.cpp
llfloaterenvsettings.cpp
+ llfloaterenvironmentsettings.cpp
llfloaterevent.cpp
llfloaterfonttest.cpp
llfloatergesture.cpp
@@ -722,6 +723,7 @@ set(viewer_HEADER_FILES
llfloaterdaycycle.h
llfloaterdisplayname.h
llfloaterenvsettings.h
+ llfloaterenvironmentsettings.h
llfloaterevent.h
llfloaterfonttest.h
llfloatergesture.h
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index dfec6c4b9d..bc1e0f8b14 100644
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -82,6 +82,7 @@ void LLEnvManager::changedRegion(bool interp)
mInterpNextChangeMessage = interp;
mPendingOutgoingMessage = false;
+ LLFloaterReg::hideInstance("old_env_settings");
LLFloaterReg::hideInstance("env_settings");
resetInternalsToDefault(LLEnvKey::SCOPE_REGION);
@@ -733,6 +734,25 @@ void LLEnvManagerNew::saveUserPrefs()
gSavedSettings.setBOOL("UseDayCycle", getUseDayCycle());
}
+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.mUseDefaults = use_region_settings;
+ mUserPrefs.mUseDayCycle = !use_fixed_sky;
+
+ saveUserPrefs();
+ updateManagersFromPrefs(false);
+}
+
void LLEnvManagerNew::dumpUserPrefs()
{
LL_DEBUGS("Windlight") << "WaterPresetName: " << gSavedSettings.getString("WaterPresetName") << LL_ENDL;
diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h
index b871ebc06f..1f005ecce2 100644
--- a/indra/newview/llenvmanager.h
+++ b/indra/newview/llenvmanager.h
@@ -276,6 +276,12 @@ public:
void loadUserPrefs();
void saveUserPrefs();
+ 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);
void dumpUserPrefs();
void onRegionCrossing();
diff --git a/indra/newview/llfloaterenvironmentsettings.cpp b/indra/newview/llfloaterenvironmentsettings.cpp
new file mode 100644
index 0000000000..cbbbed9830
--- /dev/null
+++ b/indra/newview/llfloaterenvironmentsettings.cpp
@@ -0,0 +1,209 @@
+/**
+ * @file llfloaterenvironmentsettings.cpp
+ * @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$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloaterenvironmentsettings.h"
+
+#include "llcombobox.h"
+#include "llradiogroup.h"
+
+#include "llenvmanager.h"
+#include "llwaterparammanager.h"
+#include "llwlparamset.h"
+#include "llwlparammanager.h"
+
+LLFloaterEnvironmentSettings::LLFloaterEnvironmentSettings(const LLSD &key)
+: LLFloater(key)
+ ,mRegionSettingsRadioGroup(NULL)
+ ,mDayCycleSettingsRadioGroup(NULL)
+ ,mWaterPresetCombo(NULL)
+ ,mSkyPresetCombo(NULL)
+ ,mDayCyclePresetCombo(NULL)
+{
+}
+
+LLFloaterEnvironmentSettings::~LLFloaterEnvironmentSettings()
+{
+}
+
+// virtual
+BOOL LLFloaterEnvironmentSettings::postBuild()
+{
+ mRegionSettingsRadioGroup = getChild<LLRadioGroup>("region_settings_radio_group");
+ mRegionSettingsRadioGroup->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSwitchRegionSettings, this));
+
+ mDayCycleSettingsRadioGroup = getChild<LLRadioGroup>("sky_dayc_settings_radio_group");
+ mDayCycleSettingsRadioGroup->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSwitchDayCycle, this));
+
+ mWaterPresetCombo = getChild<LLComboBox>("water_settings_preset_combo");
+ mWaterPresetCombo->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSelectWaterPreset, this));
+
+ mSkyPresetCombo = getChild<LLComboBox>("sky_settings_preset_combo");
+ mSkyPresetCombo->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSelectSkyPreset, this));
+
+ mDayCyclePresetCombo = getChild<LLComboBox>("dayc_settings_preset_combo");
+ mDayCyclePresetCombo->setCommitCallback(boost::bind(&LLFloaterEnvironmentSettings::onSelectDayCyclePreset, this));
+
+ childSetCommitCallback("ok_btn", boost::bind(&LLFloaterEnvironmentSettings::onBtnOK, this), NULL);
+ childSetCommitCallback("cancel_btn", boost::bind(&LLFloaterEnvironmentSettings::onBtnCancel, this), NULL);
+
+ setCloseCallback(boost::bind(&LLFloaterEnvironmentSettings::cancel, this));
+
+ return TRUE;
+}
+
+// virtual
+void LLFloaterEnvironmentSettings::onOpen(const LLSD& key)
+{
+ LLEnvManagerNew *env_mgr = LLEnvManagerNew::getInstance();
+
+ // Save UseRegionSettings and UseFixedSky settings to restore them
+ // in case of "Cancel" button has been pressed.
+ mUseRegionSettings = env_mgr->getUseRegionSettings();
+ mUseFixedSky = env_mgr->getUseFixedSky();
+
+ mRegionSettingsRadioGroup->setSelectedIndex(mUseRegionSettings ? 0 : 1);
+ mDayCycleSettingsRadioGroup->setSelectedIndex(mUseFixedSky ? 0 : 1);
+
+ // Update other controls state based on the selected radio buttons.
+ onSwitchRegionSettings();
+ onSwitchDayCycle();
+
+ // Populate the combo boxes with appropriate lists of available presets.
+ populateWaterPresetsList();
+ populateSkyPresetsList();
+ populateDayCyclePresetsList();
+
+ // Save water, sky and day cycle presets to restore them
+ // in case of "Cancel" button has been pressed.
+ mWaterPreset = env_mgr->getWaterPresetName();
+ mSkyPreset = env_mgr->getSkyPresetName();
+ mDayCyclePreset = env_mgr->getDayCycleName();
+
+ // Select the current presets in combo boxes.
+ mWaterPresetCombo->selectByValue(mWaterPreset);
+ mSkyPresetCombo->selectByValue(mSkyPreset);
+ mDayCyclePresetCombo->selectByValue(mDayCyclePreset);
+
+ mDirty = false;
+}
+
+void LLFloaterEnvironmentSettings::onSwitchRegionSettings()
+{
+ getChild<LLView>("user_environment_settings")->setEnabled(mRegionSettingsRadioGroup->getSelectedIndex() != 0);
+
+ LLEnvManagerNew::getInstance()->setUseRegionSettings(mRegionSettingsRadioGroup->getSelectedIndex() == 0);
+
+ mDirty = true;
+}
+
+void LLFloaterEnvironmentSettings::onSwitchDayCycle()
+{
+ bool is_fixed_sky = mDayCycleSettingsRadioGroup->getSelectedIndex() == 0;
+
+ mSkyPresetCombo->setEnabled(is_fixed_sky);
+ mDayCyclePresetCombo->setEnabled(!is_fixed_sky);
+
+ if (is_fixed_sky)
+ {
+ LLEnvManagerNew::getInstance()->setUseSkyPreset(mSkyPresetCombo->getValue().asString());
+ }
+ else
+ {
+ LLEnvManagerNew::getInstance()->setUseDayCycle(mDayCyclePresetCombo->getValue().asString());
+ }
+
+ mDirty = true;
+}
+
+void LLFloaterEnvironmentSettings::onSelectWaterPreset()
+{
+ LLEnvManagerNew::getInstance()->setUseWaterPreset(mWaterPresetCombo->getValue().asString());
+ mDirty = true;
+}
+
+void LLFloaterEnvironmentSettings::onSelectSkyPreset()
+{
+ LLEnvManagerNew::getInstance()->setUseSkyPreset(mSkyPresetCombo->getValue().asString());
+ mDirty = true;
+}
+
+void LLFloaterEnvironmentSettings::onSelectDayCyclePreset()
+{
+ LLEnvManagerNew::getInstance()->setUseDayCycle(mDayCyclePresetCombo->getValue().asString());
+ mDirty = true;
+}
+
+void LLFloaterEnvironmentSettings::onBtnOK()
+{
+ mDirty = false;
+ closeFloater();
+}
+
+void LLFloaterEnvironmentSettings::onBtnCancel()
+{
+ cancel();
+ closeFloater();
+}
+
+void LLFloaterEnvironmentSettings::cancel()
+{
+ if (!mDirty) return;
+
+ // Restore the saved user prefs
+ LLEnvManagerNew::getInstance()->setUserPrefs(mWaterPreset, mSkyPreset, mDayCyclePreset, mUseFixedSky, mUseRegionSettings);
+}
+
+void LLFloaterEnvironmentSettings::populateWaterPresetsList()
+{
+ mWaterPresetCombo->removeall();
+
+ const std::map<std::string, LLWaterParamSet> &water_params_map = LLWaterParamManager::getInstance()->mParamList;
+ for (std::map<std::string, LLWaterParamSet>::const_iterator it = water_params_map.begin(); it != water_params_map.end(); it++)
+ {
+ mWaterPresetCombo->add(it->first);
+ }
+}
+
+void LLFloaterEnvironmentSettings::populateSkyPresetsList()
+{
+ mSkyPresetCombo->removeall();
+
+ const std::map<LLWLParamKey, LLWLParamSet> &sky_params_map = LLWLParamManager::getInstance()->mParamList;
+ for (std::map<LLWLParamKey, LLWLParamSet>::const_iterator it = sky_params_map.begin(); it != sky_params_map.end(); it++)
+ {
+ mSkyPresetCombo->add(it->first.name);
+ }
+}
+
+void LLFloaterEnvironmentSettings::populateDayCyclePresetsList()
+{
+ mDayCyclePresetCombo->removeall();
+
+ std::string day_cycle_name = LLEnvManagerNew::getInstance()->getDayCycleName();
+ mDayCyclePresetCombo->add(day_cycle_name);
+}
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
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 6dc85799ce..a6dee5a553 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -50,6 +50,7 @@
#include "llfloatercamera.h"
#include "llfloaterdaycycle.h"
#include "llfloaterdisplayname.h"
+#include "llfloaterenvironmentsettings.h"
#include "llfloaterevent.h"
#include "llfloatersearch.h"
#include "llfloaterenvsettings.h"
@@ -154,7 +155,8 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("env_day_cycle", "floater_day_cycle_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDayCycle>);
LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>);
- LLFloaterReg::add("env_settings", "floater_env_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvSettings>);
+ LLFloaterReg::add("old_env_settings", "floater_env_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvSettings>);
+ LLFloaterReg::add("env_settings", "floater_environment_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEnvironmentSettings>);
LLFloaterReg::add("env_water", "floater_water.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWater>);
LLFloaterReg::add("env_windlight", "floater_windlight_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWindLight>);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 4acf9a1fad..0edba58755 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7579,10 +7579,16 @@ class LLWorldEnvSettings : public view_listener_t
std::string tod = userdata.asString();
LLVector3 sun_direction;
- if (tod == "editor")
+ if (tod == "old_editor")
{
// if not there or is hidden, show it
// *TODO replace with LLFloaterWindLight::show(LLEnvKey::SCOPE_LOCAL) to make sure we're using the right scope?
+ LLFloaterReg::toggleInstance("old_env_settings");
+ return true;
+ }
+
+ if (tod == "editor")
+ {
LLFloaterReg::toggleInstance("env_settings");
return true;
}
@@ -7612,38 +7618,6 @@ class LLWorldEnvSettings : public view_listener_t
}
};
-class LLWorldCheckEnvironment : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- const std::string& item = userdata.asString();
-
- if (item == "use_region_settings")
- {
- // Check whether we're using region environment settings.
- return LLEnvManagerNew::instance().getUseRegionSettings();
- }
-
- return true;
- }
-};
-
-class LLWorldEnvironment : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- const std::string& item = userdata.asString();
-
- if (item == "use_region_settings")
- {
- bool cur_val = LLEnvManagerNew::instance().getUseRegionSettings();
- LLEnvManagerNew::instance().setUseRegionSettings(!cur_val);
- }
-
- return true;
- }
-};
-
/// Post-Process callbacks
class LLWorldPostProcess : public view_listener_t
{
@@ -7892,8 +7866,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun");
view_listener_t::addMenu(new LLWorldEnvSettings(), "World.EnvSettings");
- view_listener_t::addEnable(new LLWorldCheckEnvironment(), "World.CheckEnvironment");
- view_listener_t::addMenu(new LLWorldEnvironment(), "World.Environment");
view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess");
view_listener_t::addMenu(new LLWorldDayCycle(), "World.DayCycle");
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index 0913c4dec2..7af17a8d0b 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -547,7 +547,7 @@ void LLWLParamManager::update(LLViewerCamera * cam)
{
dlfloater->syncMenu();
}
- LLFloaterEnvSettings* envfloater = LLFloaterReg::findTypedInstance<LLFloaterEnvSettings>("env_settings");
+ LLFloaterEnvSettings* envfloater = LLFloaterReg::findTypedInstance<LLFloaterEnvSettings>("old_env_settings");
if (envfloater)
{
envfloater->syncMenu();
diff --git a/indra/newview/skins/default/xui/en/floater_environment_settings.xml b/indra/newview/skins/default/xui/en/floater_environment_settings.xml
index 77cad2a2bd..8460530f97 100644
--- a/indra/newview/skins/default/xui/en/floater_environment_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_environment_settings.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- height="400"
+ height="350"
layout="topleft"
name="Environment Editor Floater"
help_topic="environment_editor_floater"
@@ -9,100 +9,80 @@
title="ENVIRONMENT EDITOR"
width="600">
- <!-- Water Settings -->
<view_border
bevel_style="none"
follows="top|left"
- height="100"
+ height="237"
layout="topleft"
left="50"
- name="water_panel"
+ name="border"
top="50"
- width="500"/>
- <text
- name="water_settings_title"
+ width="500"/>
+ <radio_group
follows="top|left"
- height="16"
+ height="45"
layout="topleft"
- left_delta="5"
- top_delta="5"
- width="35">
- Water
- </text>
-
- <radio_group
- follows="top|left"
- height="45"
- layout="topleft"
- name="water_settings_radio_group"
- top_pad="20"
- width="200">
- <radio_item
+ left_delta="10"
+ name="region_settings_radio_group"
+ top_delta="20"
+ width="200">
+ <radio_item
label="Use region settings"
layout="topleft"
- name="region_water_settings"/>
- <radio_item
+ name="use_region_settings"/>
+ <radio_item
label="Use my settings"
layout="topleft"
- name="my_water_settings"
- top_pad="20"/>
+ name="use_my_settings"
+ top_pad="20"/>
</radio_group>
+
+ <panel
+ height="170"
+ layout="topleft"
+ left="50"
+ name="user_environment_settings"
+ top_pad="0"
+ width="500">
+
+ <!-- Water Setting -->
+ <text
+ name="water_settings_title"
+ follows="top|left"
+ height="16"
+ layout="topleft"
+ left="50"
+ top_pad="30"
+ width="200">
+ Water Setting
+ </text>
<combo_box
follows="top|left"
left_pad="2"
name="water_settings_preset_combo"
- top_delta="24"
+ top_delta="-7"
width="200">
<combo_box.item
label="-Select a preset-"
- name="item0"
- value="any" />
+ name="item0"/>
</combo_box>
-
+
<!-- Sky/Day Cycle Settings -->
- <view_border
- bevel_style="none"
- follows="top|left"
- height="180"
- layout="topleft"
- left="50"
- name="sky_dayc_panel"
- top="175"
- width="500"/>
<text
name="sky_dayc_settings_title"
follows="top|left"
height="16"
layout="topleft"
- left="55"
- top_delta="5"
+ left="50"
+ top_pad="30"
width="100">
Sky / Day Cycle
</text>
-
- <radio_group
- follows="top|left"
- height="45"
- layout="topleft"
- name="sky_dayc_settings_radio_group1"
- top_pad="20"
- width="200">
- <radio_item
- layout="topleft"
- label="Use region settings"
- name="region_sky_dayc_settings"/>
- <radio_item
- layout="topleft"
- label="Use my settings"
- name="my_sky_dayc_settings"
- top_pad="20"/>
- </radio_group>
-
<radio_group
layout="topleft"
left_delta="50"
- name="sky_dayc_settings_radio_group2"
+ name="sky_dayc_settings_radio_group"
top_pad="10"
height="50"
width="150">
@@ -124,17 +104,34 @@
width="200">
<combo_box.item
label="-Select a preset-"
- name="item0"
- value="any" />
+ name="item0"/>
</combo_box>
- <combo_box
+ <combo_box
follows="top|left"
name="dayc_settings_preset_combo"
top_delta="36"
width="200">
<combo_box.item
label="-Select a preset-"
- name="item0"
- value="any" />
- </combo_box>
+ name="item0"/>
+ </combo_box>
+ </panel>
+
+ <button
+ follows="left|top"
+ height="23"
+ label="OK"
+ layout="topleft"
+ right="-160"
+ name="ok_btn"
+ top_pad="20"
+ width="100" />
+ <button
+ follows="left|top"
+ height="23"
+ label="Cancel"
+ layout="topleft"
+ left_pad="10"
+ name="cancel_btn"
+ width="100" />
</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 04a0350283..38bffd04ed 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -505,31 +505,7 @@
function="World.EnvSettings"
parameter="midnight" />
</menu_item_call>
- <menu_item_separator/>
- <menu_item_call
- label="Use Region Sun"
- name="Revert to Region Default">
- <menu_item_call.on_click
- function="World.EnvSettings"
- parameter="default" />
- </menu_item_call>
</menu>
- <menu
- create_jump_keys="true"
- label="Edit My Environment"
- name="Environment"
- tear_off="true">
- <menu_item_check
- label="Use Region Settings"
- name="Use Region Settings">
- <on_check
- function="World.CheckEnvironment"
- parameter="use_region_settings" />
- <on_click
- function="World.Environment"
- parameter="use_region_settings" />
- </menu_item_check>
- </menu>
<menu
@@ -546,6 +522,14 @@
parameter="editor"/>
</menu_item_call>
+ <menu_item_call
+ label="Enviroment Settings (old)"
+ name="Enviroment Settings (old)">
+ <menu_item_call.on_click
+ function="World.EnvSettings"
+ parameter="old_editor"/>
+ </menu_item_call>
+
<menu_item_separator/>
<menu