summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpaneleditsky.cpp12
-rw-r--r--indra/newview/llpaneleditwater.cpp26
-rw-r--r--indra/newview/llpaneleditwater.h18
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml11
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml53
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_water.xml118
-rw-r--r--indra/newview/skins/default/xui/en/widgets/xy_vector.xml29
7 files changed, 96 insertions, 171 deletions
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index dc724ce9c7..b6cd4bb37f 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -49,8 +49,7 @@ namespace
const std::string FIELD_SKY_CLOUD_COLOR("cloud_color");
const std::string FIELD_SKY_CLOUD_COVERAGE("cloud_coverage");
const std::string FIELD_SKY_CLOUD_SCALE("cloud_scale");
- const std::string FIELD_SKY_CLOUD_SCROLL_X("cloud_scroll_x");
- const std::string FIELD_SKY_CLOUD_SCROLL_Y("cloud_scroll_y");
+ const std::string FIELD_SKY_CLOUD_SCROLL_XY("cloud_scroll_xy");
const std::string FIELD_SKY_CLOUD_MAP("cloud_map");
const std::string FIELD_SKY_CLOUD_DENSITY_X("cloud_density_x");
const std::string FIELD_SKY_CLOUD_DENSITY_Y("cloud_density_y");
@@ -194,8 +193,7 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild()
getChild<LLUICtrl>(FIELD_SKY_CLOUD_COLOR)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudColorChanged(); });
getChild<LLUICtrl>(FIELD_SKY_CLOUD_COVERAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudCoverageChanged(); });
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScaleChanged(); });
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); });
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); });
+ getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); });
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); });
// getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::DEFAULT_CLOUD_TEXTURE_ID);
@@ -228,8 +226,7 @@ void LLPanelSettingsSkyCloudTab::refresh()
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setValue(mSkySettings->getCloudScale());
LLVector2 cloudScroll(mSkySettings->getCloudScrollRate());
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_X)->setValue(cloudScroll[0]);
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_Y)->setValue(cloudScroll[1]);
+ getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->setValue(cloudScroll.getValue());
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setValue(mSkySettings->getCloudNoiseTextureId());
@@ -262,8 +259,7 @@ void LLPanelSettingsSkyCloudTab::onCloudScaleChanged()
void LLPanelSettingsSkyCloudTab::onCloudScrollChanged()
{
- LLVector2 scroll(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_X)->getValue().asReal(),
- getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_Y)->getValue().asReal());
+ LLVector2 scroll(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->getValue());
mSkySettings->setCloudScrollRate(scroll);
}
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index b0a300abe3..21b2868e7b 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -31,6 +31,7 @@
#include "llslider.h"
#include "lltexturectrl.h"
#include "llcolorswatch.h"
+#include "llxyvector.h"
namespace
{
@@ -39,11 +40,8 @@ namespace
const std::string FIELD_WATER_UNDERWATER_MOD("water_underwater_mod");
const std::string FIELD_WATER_NORMAL_MAP("water_normal_map");
- const std::string FIELD_WATER_WAVE1_X("water_wave1_x");
- const std::string FIELD_WATER_WAVE1_Y("water_wave1_y");
-
- const std::string FIELD_WATER_WAVE2_X("water_wave2_x");
- const std::string FIELD_WATER_WAVE2_Y("water_wave2_y");
+ const std::string FIELD_WATER_WAVE1_XY("water_wave1_xy");
+ const std::string FIELD_WATER_WAVE2_XY("water_wave2_xy");
const std::string FIELD_WATER_NORMAL_SCALE_X("water_normal_scale_x");
const std::string FIELD_WATER_NORMAL_SCALE_Y("water_normal_scale_y");
@@ -82,6 +80,8 @@ BOOL LLPanelSettingsWaterMainTab::postBuild()
mClrFogColor = getChild<LLColorSwatchCtrl>(FIELD_WATER_FOG_COLOR);
mTxtNormalMap = getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP);
+ getChild<LLXYVector>(FIELD_WATER_WAVE1_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLargeWaveChanged(); });
+
mClrFogColor->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogColorChanged(); });
getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogDensityChanged(); });
// getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogDensityChanged(getChild<LLUICtrl>(FIELD_WATER_FOG_DENSITY)->getValue().asReal()); });
@@ -90,11 +90,7 @@ BOOL LLPanelSettingsWaterMainTab::postBuild()
mTxtNormalMap->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
mTxtNormalMap->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalMapChanged(); });
- getChild<LLUICtrl>(FIELD_WATER_WAVE1_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLargeWaveChanged(); });
- getChild<LLUICtrl>(FIELD_WATER_WAVE1_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLargeWaveChanged(); });
-
- getChild<LLUICtrl>(FIELD_WATER_WAVE2_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
- getChild<LLUICtrl>(FIELD_WATER_WAVE2_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
+ getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalScaleChanged(); });
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalScaleChanged(); });
@@ -128,11 +124,9 @@ void LLPanelSettingsWaterMainTab::refresh()
getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setValue(mWaterSettings->getFogMod());
mTxtNormalMap->setValue(mWaterSettings->getNormalMapID());
LLVector2 vect2 = mWaterSettings->getWave1Dir();
- getChild<LLUICtrl>(FIELD_WATER_WAVE1_X)->setValue(vect2[0]);
- getChild<LLUICtrl>(FIELD_WATER_WAVE1_Y)->setValue(vect2[1]);
+ getChild<LLUICtrl>(FIELD_WATER_WAVE1_XY)->setValue(vect2.getValue());
vect2 = mWaterSettings->getWave2Dir();
- getChild<LLUICtrl>(FIELD_WATER_WAVE2_X)->setValue(vect2[0]);
- getChild<LLUICtrl>(FIELD_WATER_WAVE2_Y)->setValue(vect2[1]);
+ getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->setValue(vect2.getValue());
LLVector3 vect3 = mWaterSettings->getNormalScale();
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->setValue(vect3[0]);
getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->setValue(vect3[1]);
@@ -169,14 +163,14 @@ void LLPanelSettingsWaterMainTab::onNormalMapChanged()
void LLPanelSettingsWaterMainTab::onLargeWaveChanged()
{
- LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE1_X)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_WAVE1_Y)->getValue().asReal());
+ LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE1_XY)->getValue());
LL_WARNS("LAPRAS") << "Changing Large Wave from " << mWaterSettings->getWave1Dir() << " -> " << vect << LL_ENDL;
mWaterSettings->setWave1Dir(vect);
}
void LLPanelSettingsWaterMainTab::onSmallWaveChanged()
{
- LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE2_X)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_WAVE2_Y)->getValue().asReal());
+ LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->getValue());
LL_WARNS("LAPRAS") << "Changing Small Wave from " << mWaterSettings->getWave2Dir() << " -> " << vect << LL_ENDL;
mWaterSettings->setWave2Dir(vect);
}
diff --git a/indra/newview/llpaneleditwater.h b/indra/newview/llpaneleditwater.h
index 3b41a1bb24..1b70bf265c 100644
--- a/indra/newview/llpaneleditwater.h
+++ b/indra/newview/llpaneleditwater.h
@@ -36,6 +36,7 @@
class LLSlider;
class LLColorSwatchCtrl;
class LLTextureCtrl;
+class LLXYVector;
//=========================================================================
class LLPanelSettingsWater : public LLSettingsEditPanel
@@ -76,23 +77,6 @@ private:
// LLSlider * mSldUnderWaterMod;
LLTextureCtrl * mTxtNormalMap;
-// // Temp until XY control
-// LLSlider * mSldWave1X;
-// LLSlider * mSldWave1Y;
-//
-// // Temp until XY control
-// LLSlider * mSldWave2X;
-// LLSlider * mSldWave2Y;
-//
-// LLSlider * mSldNormalScaleX;
-// LLSlider * mSldNormalScaleY;
-// LLSlider * mSldNormalScaleZ;
-// LLSlider * mSldFresnelScale;
-// LLSlider * mSldFresnelOffset;
-// LLSlider * mSldScaleAbove;
-// LLSlider * mSldScaleBelow;
-// LLSlider * mSldBlurMultip;
-
void onFogColorChanged();
void onFogDensityChanged();
void onFogUnderWaterChanged();
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index a1140b2532..fdd00ca910 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -6,7 +6,8 @@
help_topic="day_presets"
save_rect="true"
title="Edit Day Cycle"
- width="705">
+ width="705"
+ can_resize="true">
<!-- obsolete?, add as hint for 'save' button? -->
<string name="title_new">Create a New Day Cycle</string>
@@ -434,16 +435,16 @@
tool_tip="Replace frame with settings from inventory"/>
</layout_panel>
<layout_panel name="frame_settings_water"
- auto_resize="false"
+ auto_resize="true"
user_resize="true"
- height="351"
+ height="450"
width="700"
min_height="0"
visible="false">
<tab_container
follows="all"
halign="left"
- height="386"
+ height="420"
layout="topleft"
left="0"
name="water_tabs"
@@ -466,7 +467,7 @@
<layout_panel name="frame_settings_sky"
auto_resize="false"
user_resize="true"
- height="351"
+ height="450"
width="700"
min_height="0"
visible="true">
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
index 9bd931f9fb..57658a4725 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
@@ -95,51 +95,24 @@
width="200">
Cloud Scroll:
</text>
- <panel
+ <xy_vector
follows="left|top"
- border="true"
- bg_alpha_color="red"
- background_visible="true"
- width="100"
- height="100"
- left_delta="5"
- top_delta="21">
- <text>
- placeholder
- </text>
- <slider
- decimal_digits="1"
- follows="left|top"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- label="X:"
- left_delta="10"
- max_val="10"
- min_val="-10"
- name="cloud_scroll_x"
- top_pad="5"
- width="100"/>
- <slider
- decimal_digits="1"
- follows="left|top"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- label="Y:"
- left_delta="0"
- max_val="10"
- min_val="-10"
- name="cloud_scroll_y"
- top_pad="5"
- orientation="vertical"
- height="70"/>
- </panel>
+ name="cloud_scroll_xy"
+ width="120"
+ height="145"
+ visible="true"
+ left_delta="0"
+ top_delta="21"
+ min_val_x="-10"
+ max_val_x="10"
+ min_val_y="-10"
+ max_val_y="10" />
+
<text
follows="left|top"
height="10"
layout="topleft"
- left_delta="115"
+ left_delta="160"
top_delta="-20"
width="200">
Cloud Image:
diff --git a/indra/newview/skins/default/xui/en/panel_settings_water.xml b/indra/newview/skins/default/xui/en/panel_settings_water.xml
index 59184b0f95..85d636d107 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_water.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_water.xml
@@ -7,7 +7,7 @@
left="0"
help_topic="land_general_tab"
name="panel_settings_water"
- top="0">
+ top="0">
<layout_stack name="water_stack1"
follows="all"
layout="topleft"
@@ -109,7 +109,7 @@
auto_resize="true"
user_resize="true"
visible="true"
- min_width="375"
+ min_width="460"
width="50">
<text
follows="left|top"
@@ -143,98 +143,46 @@
height="16"
layout="topleft"
top_delta="-20"
- left_delta="120">
+ left_delta="130">
Large Wave Speed
</text>
- <panel
- follows="left|top"
- border="true"
- bg_alpha_color="red"
- background_visible="true"
- width="100"
- height="100"
- left_delta="0"
- top_delta="21">
- <text>
- placeholder
- </text>
- <slider
- decimal_digits="1"
- follows="left|top"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- label="X:"
- left_delta="10"
- max_val="4"
- min_val="-4"
- name="water_wave1_x"
- top_pad="5"
- width="100"/>
- <slider
- decimal_digits="1"
- follows="left|top"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- label="Y:"
- left_delta="0"
- max_val="4"
- min_val="-4"
- name="water_wave1_y"
- top_pad="5"
- orientation="vertical"
- height="70"/>
- </panel>
+ <xy_vector
+ follows="top|left"
+ name="water_wave1_xy"
+ width="120"
+ height="145"
+ visible="true"
+ left_delta="0"
+ top_delta="21"
+ min_val_x="-4"
+ max_val_x="4"
+ increment_x="0.5f"
+ min_val_y="-4"
+ max_val_y="4"
+ increment_y="0.5f"
+ arrow_color="red"/>
+
<text
follows="left|top"
height="16"
layout="topleft"
top_delta="-20"
- left_delta="120">
+ left_delta="160">
Small Wave Speed
</text>
- <panel
- follows="left|top"
- border="true"
- bg_alpha_color="red"
- background_visible="true"
- width="100"
- height="100"
- left_delta="0"
- top_delta="21"
- >
- <text>
- placeholder
- </text>
- <slider
- decimal_digits="1"
- follows="left|top"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- label="X:"
- left_delta="10"
- max_val="4"
- min_val="-4"
- name="water_wave2_x"
- top_pad="5"
- width="100"/>
- <slider
- decimal_digits="1"
- follows="left|top"
- increment="0.01"
- initial_value="0"
- layout="topleft"
- label="Y:"
- left_delta="0"
- max_val="4"
- min_val="-4"
- name="water_wave2_y"
- top_pad="5"
- orientation="vertical"
- height="70"/>
- </panel>
+ <xy_vector
+ follows="top|left"
+ name="water_wave2_xy"
+ width="120"
+ height="145"
+ visible="true"
+ left_delta="0"
+ top_delta="21"
+ min_val_x="-4"
+ max_val_x="4"
+ min_val_y="-4"
+ max_val_y="4"
+ arrow_color="green"/>
<text
follows="left|top|right"
diff --git a/indra/newview/skins/default/xui/en/widgets/xy_vector.xml b/indra/newview/skins/default/xui/en/widgets/xy_vector.xml
new file mode 100644
index 0000000000..93ae26a6ad
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/widgets/xy_vector.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<xy_vector
+ name="xyvector"
+ width="120"
+ height="140"
+ decimal_digits="1"
+ label_width="16"
+ padding="4"
+ edit_bar_height="18"
+ user_resize="false">
+
+ <xy_vector.border
+ visible="true"/>
+
+ <xy_vector.x_entry
+ name="XEntry"
+ tab_stop="true"
+ label="X:"/>
+ <xy_vector.y_entry
+ name="YEntry"
+ tab_stop="true"
+ label="Y:"/>
+
+ <xy_vector.touch_area
+ name="TouchArea"
+ bevel_style="in"
+ border_visible="true"/>
+
+</xy_vector>