diff options
author | McCabe Maxsted | 2009-10-11 07:53:03 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-10-11 07:53:03 -0700 |
commit | f7fa0b1afa99596df47f68511d0fddf7522448fc (patch) | |
tree | 7a7bc9226961bfb1d6bc7f8c80cd33eb0153cbb0 /linden/indra/newview | |
parent | Added next/prev buttons to windlight water window (diff) | |
download | meta-impy-f7fa0b1afa99596df47f68511d0fddf7522448fc.zip meta-impy-f7fa0b1afa99596df47f68511d0fddf7522448fc.tar.gz meta-impy-f7fa0b1afa99596df47f68511d0fddf7522448fc.tar.bz2 meta-impy-f7fa0b1afa99596df47f68511d0fddf7522448fc.tar.xz |
Added advanced water and windlight sky tabs to sky presets pulldown
Diffstat (limited to 'linden/indra/newview')
5 files changed, 72 insertions, 1 deletions
diff --git a/linden/indra/newview/llfloaterwindlight.cpp b/linden/indra/newview/llfloaterwindlight.cpp index 71e81fa..80090a0 100644 --- a/linden/indra/newview/llfloaterwindlight.cpp +++ b/linden/indra/newview/llfloaterwindlight.cpp | |||
@@ -46,6 +46,7 @@ | |||
46 | #include "llcombobox.h" | 46 | #include "llcombobox.h" |
47 | #include "lllineeditor.h" | 47 | #include "lllineeditor.h" |
48 | #include "llfloaterdaycycle.h" | 48 | #include "llfloaterdaycycle.h" |
49 | #include "lltabcontainer.h" | ||
49 | #include "llboost.h" | 50 | #include "llboost.h" |
50 | 51 | ||
51 | #include "v4math.h" | 52 | #include "v4math.h" |
@@ -1066,3 +1067,13 @@ void LLFloaterWindLight::onClickPrev(void* user_data) | |||
1066 | param_mgr->mAnimator.mUseLindenTime = false; | 1067 | param_mgr->mAnimator.mUseLindenTime = false; |
1067 | param_mgr->loadPreset(mIt->first, true); | 1068 | param_mgr->loadPreset(mIt->first, true); |
1068 | } | 1069 | } |
1070 | |||
1071 | //static | ||
1072 | void LLFloaterWindLight::selectTab(std::string tab_name) | ||
1073 | { | ||
1074 | if (!tab_name.empty()) | ||
1075 | { | ||
1076 | LLTabContainer* tabs = LLFloaterWindLight::instance()->getChild<LLTabContainer>("WindLight Tabs"); | ||
1077 | tabs->selectTabByName(tab_name); | ||
1078 | } | ||
1079 | } | ||
diff --git a/linden/indra/newview/llfloaterwindlight.h b/linden/indra/newview/llfloaterwindlight.h index 70e76c5..130a9a7 100644 --- a/linden/indra/newview/llfloaterwindlight.h +++ b/linden/indra/newview/llfloaterwindlight.h | |||
@@ -131,6 +131,8 @@ public: | |||
131 | /// turn off animated skies | 131 | /// turn off animated skies |
132 | static void deactivateAnimator(); | 132 | static void deactivateAnimator(); |
133 | 133 | ||
134 | static void selectTab(std::string tab_name); | ||
135 | |||
134 | private: | 136 | private: |
135 | // one instance on the inside | 137 | // one instance on the inside |
136 | static LLFloaterWindLight* sWindLight; | 138 | static LLFloaterWindLight* sWindLight; |
diff --git a/linden/indra/newview/llwindlightremotectrl.cpp b/linden/indra/newview/llwindlightremotectrl.cpp index ae9a90a..f805763 100644 --- a/linden/indra/newview/llwindlightremotectrl.cpp +++ b/linden/indra/newview/llwindlightremotectrl.cpp | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "llbutton.h" | 35 | #include "llbutton.h" |
36 | #include "llcombobox.h" | 36 | #include "llcombobox.h" |
37 | #include "llfloaterenvsettings.h" | 37 | #include "llfloaterenvsettings.h" |
38 | #include "llfloaterwater.h" | ||
38 | #include "llfloaterwindlight.h" | 39 | #include "llfloaterwindlight.h" |
39 | #include "lloverlaybar.h" | 40 | #include "lloverlaybar.h" |
40 | #include "lluictrlfactory.h" | 41 | #include "lluictrlfactory.h" |
@@ -154,6 +155,11 @@ void LLWindlightRemoteCtrl::refreshPresets() | |||
154 | 155 | ||
155 | // insert separator and add World menu options | 156 | // insert separator and add World menu options |
156 | mPresetsCombo->addSeparator(ADD_BOTTOM); | 157 | mPresetsCombo->addSeparator(ADD_BOTTOM); |
158 | mPresetsCombo->addSimpleElement(getString("atmosphere"), ADD_BOTTOM); | ||
159 | mPresetsCombo->addSimpleElement(getString("lighting"), ADD_BOTTOM); | ||
160 | mPresetsCombo->addSimpleElement(getString("clouds"), ADD_BOTTOM); | ||
161 | mPresetsCombo->addSimpleElement(getString("advanced_water"), ADD_BOTTOM); | ||
162 | mPresetsCombo->addSeparator(ADD_BOTTOM); | ||
157 | mPresetsCombo->addSimpleElement(getString("sunrise"), ADD_BOTTOM); | 163 | mPresetsCombo->addSimpleElement(getString("sunrise"), ADD_BOTTOM); |
158 | mPresetsCombo->addSimpleElement(getString("noon"), ADD_BOTTOM); | 164 | mPresetsCombo->addSimpleElement(getString("noon"), ADD_BOTTOM); |
159 | mPresetsCombo->addSimpleElement(getString("sunset"), ADD_BOTTOM); | 165 | mPresetsCombo->addSimpleElement(getString("sunset"), ADD_BOTTOM); |
@@ -191,7 +197,35 @@ void LLWindlightRemoteCtrl::onCommitPreset(LLUICtrl* ctrl, void* data) | |||
191 | // check for World menu options; if none, apply preset | 197 | // check for World menu options; if none, apply preset |
192 | std::string selected = self->mPresetsCombo->getSelectedValue().asString(); | 198 | std::string selected = self->mPresetsCombo->getSelectedValue().asString(); |
193 | 199 | ||
194 | if (selected == self->getString("sunrise")) | 200 | if (selected == self->getString("atmosphere")) |
201 | { | ||
202 | if (!LLFloaterWindLight::instance()->getVisible()) | ||
203 | { | ||
204 | LLFloaterWindLight::show(); | ||
205 | } | ||
206 | LLFloaterWindLight::instance()->selectTab("Atmosphere"); | ||
207 | } | ||
208 | else if (selected == self->getString("lighting")) | ||
209 | { | ||
210 | if (!LLFloaterWindLight::instance()->getVisible()) | ||
211 | { | ||
212 | LLFloaterWindLight::show(); | ||
213 | } | ||
214 | LLFloaterWindLight::instance()->selectTab("Lighting"); | ||
215 | } | ||
216 | else if (selected == self->getString("clouds")) | ||
217 | { | ||
218 | if (!LLFloaterWindLight::instance()->getVisible()) | ||
219 | { | ||
220 | LLFloaterWindLight::show(); | ||
221 | } | ||
222 | LLFloaterWindLight::instance()->selectTab("Clouds"); | ||
223 | } | ||
224 | else if (selected == self->getString("advanced_water")) | ||
225 | { | ||
226 | LLFloaterWater::show(); | ||
227 | } | ||
228 | else if (selected == self->getString("sunrise")) | ||
195 | { | 229 | { |
196 | // set the value, turn off animation | 230 | // set the value, turn off animation |
197 | LLWLParamManager::instance()->mAnimator.setDayTime(0.25); | 231 | LLWLParamManager::instance()->mAnimator.setDayTime(0.25); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote.xml b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote.xml index ead9ad7..8be72fc 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote.xml | |||
@@ -4,6 +4,18 @@ | |||
4 | name="windlight_remote" use_bounding_rect="true" width="182"> | 4 | name="windlight_remote" use_bounding_rect="true" width="182"> |
5 | <panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="22" left="0" width="182" /> | 5 | <panel bottom="1" filename="panel_bg_tab.xml" name="panel_bg_tab" height="22" left="0" width="182" /> |
6 | <panel bottom="3" filename="panel_windlight_controls.xml" name="panel_windlight_controls" height="20" left="0" width="182" /> | 6 | <panel bottom="3" filename="panel_windlight_controls.xml" name="panel_windlight_controls" height="20" left="0" width="182" /> |
7 | <string name="atmosphere"> | ||
8 | Atmosphere | ||
9 | </string> | ||
10 | <string name="lighting"> | ||
11 | Lighting | ||
12 | </string> | ||
13 | <string name="clouds"> | ||
14 | Clouds | ||
15 | </string> | ||
16 | <string name="advanced_water"> | ||
17 | Advanced Water | ||
18 | </string> | ||
7 | <string name="sunrise"> | 19 | <string name="sunrise"> |
8 | Sunrise | 20 | Sunrise |
9 | </string> | 21 | </string> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote_expanded.xml b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote_expanded.xml index e7182fa..8c43682 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote_expanded.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_windlight_remote_expanded.xml | |||
@@ -16,6 +16,18 @@ | |||
16 | m | 16 | m |
17 | </text> | 17 | </text> |
18 | <panel bottom="13" filename="panel_windlight_controls.xml" left="0" width="182" /> | 18 | <panel bottom="13" filename="panel_windlight_controls.xml" left="0" width="182" /> |
19 | <string name="atmosphere"> | ||
20 | Atmosphere | ||
21 | </string> | ||
22 | <string name="lighting"> | ||
23 | Lighting | ||
24 | </string> | ||
25 | <string name="clouds"> | ||
26 | Clouds | ||
27 | </string> | ||
28 | <string name="advanced_water"> | ||
29 | Advanced Water | ||
30 | </string> | ||
19 | <string name="sunrise"> | 31 | <string name="sunrise"> |
20 | Sunrise | 32 | Sunrise |
21 | </string> | 33 | </string> |