diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llsliderctrl.cpp | 37 | ||||
-rw-r--r-- | indra/llui/llsliderctrl.h | 4 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/depthToShadowVolumeG.glsl | 404 | ||||
-rw-r--r-- | indra/newview/llenvironment.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llenvironment.h | 5 | ||||
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfloatermyenvironment.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 69 | ||||
-rw-r--r-- | indra/newview/llpanelenvironment.h | 15 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_region_environment.xml | 651 |
13 files changed, 693 insertions, 538 deletions
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index 0056cb6dc4..c3c3ce04f9 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -283,6 +283,31 @@ void LLSliderCtrl::updateText() } } +void LLSliderCtrl::updateSliderRect() +{ + S32 right = getRect().getWidth(); + S32 top = getRect().getHeight(); + S32 bottom = 0; + S32 left = 0; + static LLUICachedControl<S32> sliderctrl_spacing("UISliderctrlSpacing", 0); + if (mEditor) + { + LLRect editor_rect = mEditor->getRect(); + S32 editor_width = editor_rect.getWidth(); + editor_rect.mRight = right; + editor_rect.mLeft = right - editor_width; + mEditor->setRect(editor_rect); + + right -= editor_width + sliderctrl_spacing; + } + if (mLabelBox) + { + left += mLabelBox->getRect().getWidth() + sliderctrl_spacing; + } + + mSlider->setRect(LLRect(left, top,right,bottom)); +} + // static void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata ) { @@ -404,6 +429,18 @@ void LLSliderCtrl::onCommit() LLF32UICtrl::onCommit(); } +void LLSliderCtrl::setRect(const LLRect& rect) +{ + LLF32UICtrl::setRect(rect); + updateSliderRect(); +} + +//virtual +void LLSliderCtrl::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLF32UICtrl::reshape(width, height, called_from_parent); + updateSliderRect(); +} void LLSliderCtrl::setPrecision(S32 precision) { diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h index 67cca9ef04..75fcdc4b71 100644 --- a/indra/llui/llsliderctrl.h +++ b/indra/llui/llsliderctrl.h @@ -125,6 +125,9 @@ public: mSlider->setControlName(control_name, context); } + /*virtual*/ void setRect(const LLRect& rect); + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + static void onSliderCommit(LLUICtrl* caller, const LLSD& userdata); static void onEditorCommit(LLUICtrl* ctrl, const LLSD& userdata); @@ -133,6 +136,7 @@ public: private: void updateText(); + void updateSliderRect(); void reportInvalidData(); const LLFontGL* mFont; diff --git a/indra/newview/app_settings/shaders/class3/deferred/depthToShadowVolumeG.glsl b/indra/newview/app_settings/shaders/class3/deferred/depthToShadowVolumeG.glsl index 5734e2abb2..cdaff4b09f 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/depthToShadowVolumeG.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/depthToShadowVolumeG.glsl @@ -1,202 +1,202 @@ -/**
- * @file depthToShadowVolumeG.glsl
- *
- * $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$
- */
-#extension GL_ARB_geometry_shader4 : enable
-#extension GL_ARB_texture_rectangle : enable
-
-/*[EXTRA_CODE_HERE]*/
-
-layout (triangles) in;
-layout (triangle_strip, max_vertices = 128) out;
-
-uniform sampler2DRect depthMap;
-uniform mat4 shadowMatrix[6];
-uniform vec4 lightpos;
-
-VARYING vec2 vary_texcoord0;
-
-out vec3 to_vec;
-
-void cross_products(out vec4 ns[3], int a, int b, int c)
-{
- ns[0] = cross(gl_PositionIn[b].xyz - gl_PositionIn[a].xyz, gl_PositionIn[c].xyz - gl_PositionIn[a].xyz);
- ns[1] = cross(gl_PositionIn[c].xyz - gl_PositionIn[b].xyz, gl_PositionIn[a].xyz - gl_PositionIn[b].xyz);
- ns[2] = cross(gl_PositionIn[a].xyz - gl_PositionIn[c].xyz, gl_PositionIn[b].xyz - gl_PositionIn[c].xyz);
-}
-
-vec3 getLightDirection(vec4 lightpos, vec3 pos)
-{
-
- vec3 lightdir = lightpos.xyz - lightpos.w * pos;
- return lightdir;
-}
-
-void emitTri(vec4 v[3])
-{
- gl_Position = proj_matrix * v[0];
- EmitVertex();
-
- gl_Position = proj_matrix * v[1];
- EmitVertex();
-
- gl_Position = proj_matrix * v[2];
- EmitVertex();
-
- EndPrimitive();
-}
-
-void emitQuad(vec4 v[4]
-{
- // Emit a quad as a triangle strip.
- gl_Position = proj_matrix*v[0];
- EmitVertex();
-
- gl_Position = proj_matrix*v[1];
- EmitVertex();
-
- gl_Position = proj_matrix*v[2];
- EmitVertex();
-
- gl_Position = proj_matrix*v[3];
- EmitVertex();
-
- EndPrimitive();
-}
-
-void emitPrimitives(int layer)
-{
- int i = layer;
- gl_Layer = i;
-
- vec4 depth1 = vec4(texture2DRect(depthMap, tc0).rg, texture2DRect(depthMap, tc1).rg));
- vec3 depth2 = vec4(texture2DRect(depthMap, tc2).rg, texture2DRect(depthMap, tc3).rg));
- vec3 depth3 = vec4(texture2DRect(depthMap, tc4).rg, texture2DRect(depthMap, tc5).rg));
- vec3 depth4 = vec4(texture2DRect(depthMap, tc6).rg, texture2DRect(depthMap, tc7).rg));
-
- depth1 = min(depth1, depth2);
- depth1 = min(depth1, depth3);
- depth1 = min(depth1, depth4);
-
- vec2 depth = min(depth1.xy, depth1.zw);
-
- int side = sqrt(gl_VerticesIn);
-
- for (int j = 0; j < side; j++)
- {
- for (int k = 0; k < side; ++k)
- {
- vec3 pos = gl_PositionIn[(j * side) + k].xyz;
- vec4 v = shadowMatrix[i] * vec4(pos, 1.0);
- gl_Position = v;
- to_vec = pos - light_position.xyz * depth;
- EmitVertex();
- }
-
- EndPrimitive();
- }
-
- vec3 norms[3]; // Normals
- vec3 lightdir3]; // Directions toward light
-
- vec4 v[4]; // Temporary vertices
-
- vec4 or_pos[3] =
- { // Triangle oriented toward light source
- gl_PositionIn[0],
- gl_PositionIn[2],
- gl_PositionIn[4]
- };
-
- // Compute normal at each vertex.
- cross_products(n, 0, 2, 4);
-
- // Compute direction from vertices to light.
- lightdir[0] = getLightDirection(lightpos, gl_PositionIn[0].xyz);
- lightdir[1] = getLightDirection(lightpos, gl_PositionIn[2].xyz);
- lightdir[2] = getLightDirection(lightpos, gl_PositionIn[4].xyz);
-
- // Check if the main triangle faces the light.
- bool faces_light = true;
- if (!(dot(ns[0],d[0]) > 0
- |dot(ns[1],d[1]) > 0
- |dot(ns[2],d[2]) > 0))
- {
- // Flip vertex winding order in or_pos.
- or_pos[1] = gl_PositionIn[4];
- or_pos[2] = gl_PositionIn[2];
- faces_light = false;
- }
-
- // Near cap: simply render triangle.
- emitTri(or_pos);
-
- // Far cap: extrude positions to infinity.
- v[0] =vec4(lightpos.w * or_pos[0].xyz - lightpos.xyz,0);
- v[1] =vec4(lightpos.w * or_pos[2].xyz - lightpos.xyz,0);
- v[2] =vec4(lightpos.w * or_pos[1].xyz - lightpos.xyz,0);
-
- emitTri(v);
-
- // Loop over all edges and extrude if needed.
- for ( int i=0; i<3; i++ )
- {
- // Compute indices of neighbor triangle.
- int v0 = i*2;
- int nb = (i*2+1);
- int v1 = (i*2+2) % 6;
- cross_products(n, v0, nb, v1);
-
- // Compute direction to light, again as above.
- d[0] =lightpos.xyz-lightpos.w*gl_PositionIn[v0].xyz;
- d[1] =lightpos.xyz-lightpos.w*gl_PositionIn[nb].xyz;
- d[2] =lightpos.xyz-lightpos.w*gl_PositionIn[v1].xyz;
-
- bool is_parallel = gl_PositionIn[nb].w < 1e-5;
-
- // Extrude the edge if it does not have a
- // neighbor, or if it's a possible silhouette.
- if (is_parallel ||
- ( faces_light != (dot(ns[0],d[0])>0 ||
- dot(ns[1],d[1])>0 ||
- dot(ns[2],d[2])>0) ))
- {
- // Make sure sides are oriented correctly.
- int i0 = faces_light ? v0 : v1;
- int i1 = faces_light ? v1 : v0;
-
- v[0] = gl_PositionIn[i0];
- v[1] = vec4(lightpos.w*gl_PositionIn[i0].xyz - lightpos.xyz, 0);
- v[2] = gl_PositionIn[i1];
- v[3] = vec4(lightpos.w*gl_PositionIn[i1].xyz - lightpos.xyz, 0);
-
- emitQuad(v);
- }
- }
-}
-
-void main()
-{
- // Output
- emitPrimitives(0);
-}
+/** + * @file depthToShadowVolumeG.glsl + * + * $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$ + */ +#extension GL_ARB_geometry_shader4 : enable +#extension GL_ARB_texture_rectangle : enable + +/*[EXTRA_CODE_HERE]*/ + +layout (triangles) in; +layout (triangle_strip, max_vertices = 128) out; + +uniform sampler2DRect depthMap; +uniform mat4 shadowMatrix[6]; +uniform vec4 lightpos; + +VARYING vec2 vary_texcoord0; + +out vec3 to_vec; + +void cross_products(out vec4 ns[3], int a, int b, int c) +{ + ns[0] = cross(gl_PositionIn[b].xyz - gl_PositionIn[a].xyz, gl_PositionIn[c].xyz - gl_PositionIn[a].xyz); + ns[1] = cross(gl_PositionIn[c].xyz - gl_PositionIn[b].xyz, gl_PositionIn[a].xyz - gl_PositionIn[b].xyz); + ns[2] = cross(gl_PositionIn[a].xyz - gl_PositionIn[c].xyz, gl_PositionIn[b].xyz - gl_PositionIn[c].xyz); +} + +vec3 getLightDirection(vec4 lightpos, vec3 pos) +{ + + vec3 lightdir = lightpos.xyz - lightpos.w * pos; + return lightdir; +} + +void emitTri(vec4 v[3]) +{ + gl_Position = proj_matrix * v[0]; + EmitVertex(); + + gl_Position = proj_matrix * v[1]; + EmitVertex(); + + gl_Position = proj_matrix * v[2]; + EmitVertex(); + + EndPrimitive(); +} + +void emitQuad(vec4 v[4] +{ + // Emit a quad as a triangle strip. + gl_Position = proj_matrix*v[0]; + EmitVertex(); + + gl_Position = proj_matrix*v[1]; + EmitVertex(); + + gl_Position = proj_matrix*v[2]; + EmitVertex(); + + gl_Position = proj_matrix*v[3]; + EmitVertex(); + + EndPrimitive(); +} + +void emitPrimitives(int layer) +{ + int i = layer; + gl_Layer = i; + + vec4 depth1 = vec4(texture2DRect(depthMap, tc0).rg, texture2DRect(depthMap, tc1).rg)); + vec3 depth2 = vec4(texture2DRect(depthMap, tc2).rg, texture2DRect(depthMap, tc3).rg)); + vec3 depth3 = vec4(texture2DRect(depthMap, tc4).rg, texture2DRect(depthMap, tc5).rg)); + vec3 depth4 = vec4(texture2DRect(depthMap, tc6).rg, texture2DRect(depthMap, tc7).rg)); + + depth1 = min(depth1, depth2); + depth1 = min(depth1, depth3); + depth1 = min(depth1, depth4); + + vec2 depth = min(depth1.xy, depth1.zw); + + int side = sqrt(gl_VerticesIn); + + for (int j = 0; j < side; j++) + { + for (int k = 0; k < side; ++k) + { + vec3 pos = gl_PositionIn[(j * side) + k].xyz; + vec4 v = shadowMatrix[i] * vec4(pos, 1.0); + gl_Position = v; + to_vec = pos - light_position.xyz * depth; + EmitVertex(); + } + + EndPrimitive(); + } + + vec3 norms[3]; // Normals + vec3 lightdir3]; // Directions toward light + + vec4 v[4]; // Temporary vertices + + vec4 or_pos[3] = + { // Triangle oriented toward light source + gl_PositionIn[0], + gl_PositionIn[2], + gl_PositionIn[4] + }; + + // Compute normal at each vertex. + cross_products(n, 0, 2, 4); + + // Compute direction from vertices to light. + lightdir[0] = getLightDirection(lightpos, gl_PositionIn[0].xyz); + lightdir[1] = getLightDirection(lightpos, gl_PositionIn[2].xyz); + lightdir[2] = getLightDirection(lightpos, gl_PositionIn[4].xyz); + + // Check if the main triangle faces the light. + bool faces_light = true; + if (!(dot(ns[0],d[0]) > 0 + |dot(ns[1],d[1]) > 0 + |dot(ns[2],d[2]) > 0)) + { + // Flip vertex winding order in or_pos. + or_pos[1] = gl_PositionIn[4]; + or_pos[2] = gl_PositionIn[2]; + faces_light = false; + } + + // Near cap: simply render triangle. + emitTri(or_pos); + + // Far cap: extrude positions to infinity. + v[0] =vec4(lightpos.w * or_pos[0].xyz - lightpos.xyz,0); + v[1] =vec4(lightpos.w * or_pos[2].xyz - lightpos.xyz,0); + v[2] =vec4(lightpos.w * or_pos[1].xyz - lightpos.xyz,0); + + emitTri(v); + + // Loop over all edges and extrude if needed. + for ( int i=0; i<3; i++ ) + { + // Compute indices of neighbor triangle. + int v0 = i*2; + int nb = (i*2+1); + int v1 = (i*2+2) % 6; + cross_products(n, v0, nb, v1); + + // Compute direction to light, again as above. + d[0] =lightpos.xyz-lightpos.w*gl_PositionIn[v0].xyz; + d[1] =lightpos.xyz-lightpos.w*gl_PositionIn[nb].xyz; + d[2] =lightpos.xyz-lightpos.w*gl_PositionIn[v1].xyz; + + bool is_parallel = gl_PositionIn[nb].w < 1e-5; + + // Extrude the edge if it does not have a + // neighbor, or if it's a possible silhouette. + if (is_parallel || + ( faces_light != (dot(ns[0],d[0])>0 || + dot(ns[1],d[1])>0 || + dot(ns[2],d[2])>0) )) + { + // Make sure sides are oriented correctly. + int i0 = faces_light ? v0 : v1; + int i1 = faces_light ? v1 : v0; + + v[0] = gl_PositionIn[i0]; + v[1] = vec4(lightpos.w*gl_PositionIn[i0].xyz - lightpos.xyz, 0); + v[2] = gl_PositionIn[i1]; + v[3] = vec4(lightpos.w*gl_PositionIn[i1].xyz - lightpos.xyz, 0); + + emitQuad(v); + } + } +} + +void main() +{ + // Output + emitPrimitives(0); +} diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index d925dd9d49..5acd508d5d 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1200,7 +1200,7 @@ void LLEnvironment::updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_lengt updateParcel(INVALID_PARCEL_ID, pday, day_length, day_offset, altitudes, cb); } -void LLEnvironment::updateRegion(const LLUUID &asset_id, std::string display_name, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb) +void LLEnvironment::updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb) { if (!isExtendedEnvironmentEnabled()) { @@ -1209,7 +1209,7 @@ void LLEnvironment::updateRegion(const LLUUID &asset_id, std::string display_nam return; } - updateParcel(INVALID_PARCEL_ID, asset_id, display_name, day_length, day_offset, altitudes, cb); + updateParcel(INVALID_PARCEL_ID, asset_id, display_name, track_num, day_length, day_offset, altitudes, cb); } void LLEnvironment::updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb) @@ -1261,12 +1261,12 @@ void LLEnvironment::requestParcel(S32 parcel_id, environment_apply_fn cb) [this, parcel_id, cb]() { coroRequestEnvironment(parcel_id, cb); }); } -void LLEnvironment::updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb) +void LLEnvironment::updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb) { UpdateInfo::ptr_t updates(std::make_shared<UpdateInfo>(asset_id, display_name, day_length, day_offset, altitudes)); std::string coroname = LLCoros::instance().launch("LLEnvironment::coroUpdateEnvironment", - [this, parcel_id, updates, cb]() { coroUpdateEnvironment(parcel_id, NO_TRACK, updates, cb); }); + [this, parcel_id, track_num, updates, cb]() { coroUpdateEnvironment(parcel_id, track_num, updates, cb); }); } void LLEnvironment::onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes) @@ -1309,13 +1309,18 @@ void LLEnvironment::updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pw updateParcel(parcel_id, pday, day_length, day_offset, altitudes, cb); } -void LLEnvironment::updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb) +void LLEnvironment::updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 track_num, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb) { UpdateInfo::ptr_t updates(std::make_shared<UpdateInfo>(pday, day_length, day_offset, altitudes)); std::string coroname = LLCoros::instance().launch("LLEnvironment::coroUpdateEnvironment", - [this, parcel_id, updates, cb]() { coroUpdateEnvironment(parcel_id, NO_TRACK, updates, cb); }); + [this, parcel_id, track_num, updates, cb]() { coroUpdateEnvironment(parcel_id, track_num, updates, cb); }); +} + +void LLEnvironment::updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, LLEnvironment::altitudes_vect_t altitudes, environment_apply_fn cb) +{ + updateParcel(parcel_id, pday, NO_TRACK, day_length, day_offset, altitudes, cb); } diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index d9b667cd79..c925ea6e7c 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -201,13 +201,14 @@ public: connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); } void requestRegion(environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLUUID &asset_id, std::string display_name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void resetRegion(environment_apply_fn cb = environment_apply_fn()); void requestParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index b27efb56fd..048090aea6 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1476,7 +1476,7 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons if (mInventoryItem && !isDirty()) { - LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), -1, -1); + LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1); } else { @@ -1487,7 +1487,7 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons { if (mInventoryItem && !isDirty()) { - LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), -1, -1); + LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1); } else { diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 712c7cf31a..4e6bc6eae0 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -549,7 +549,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where) if (mInventoryItem && !isDirty()) { - LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), -1, -1); + LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1); } else if (mSettings->getSettingsType() == "sky") { @@ -564,7 +564,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where) { if (mInventoryItem && !isDirty()) { - LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), -1, -1); + LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1); } else if (mSettings->getSettingsType() == "sky") { diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index f93d7ce8ed..1edec248d9 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -324,7 +324,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context) if (context == PARAMETER_REGION) { - LLEnvironment::instance().updateRegion(asset_id, name, -1, -1); + LLEnvironment::instance().updateRegion(asset_id, name, LLEnvironment::NO_TRACK, -1, -1); LLEnvironment::instance().setSharedEnvironment(); } else if (context == PARAMETER_PARCEL) @@ -335,7 +335,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context) LL_WARNS("ENVIRONMENT") << "Unable to determine parcel." << LL_ENDL; return; } - LLEnvironment::instance().updateParcel(parcel->getLocalID(), asset_id, name, -1, -1); + LLEnvironment::instance().updateParcel(parcel->getLocalID(), asset_id, name, LLEnvironment::NO_TRACK, -1, -1); LLEnvironment::instance().setSharedEnvironment(); } else if (context == PARAMETER_LOCAL) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 44927de75e..fda77c72c0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6959,7 +6959,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action S32 parcel_id = parcel->getLocalID(); LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; - LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, -1, -1); + LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, LLEnvironment::NO_TRACK, -1, -1); LLEnvironment::instance().setSharedEnvironment(); } else @@ -6971,7 +6971,10 @@ void LLSettingsBridge::openItem() LLViewerInventoryItem* item = getItem(); if (item) { - LLInvFVBridgeAction::doAction(item->getType(), mUUID, getInventoryModel()); + if (item->getPermissions().getOwner() != gAgent.getID()) + LLNotificationsUtil::add("NoEditFromLibrary"); + else + LLInvFVBridgeAction::doAction(item->getType(), mUUID, getInventoryModel()); } } diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index abd1913185..f84ceb6853 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -73,6 +73,7 @@ const std::string LLPanelEnvironmentInfo::SLD_DAYLENGTH("sld_day_length"); const std::string LLPanelEnvironmentInfo::SLD_DAYOFFSET("sld_day_offset"); const std::string LLPanelEnvironmentInfo::SLD_ALTITUDES("sld_altitudes"); const std::string LLPanelEnvironmentInfo::ICN_GROUND("icon_ground"); +const std::string LLPanelEnvironmentInfo::ICN_WATER("icon_water"); const std::string LLPanelEnvironmentInfo::CHK_ALLOWOVERRIDE("chk_allow_override"); const std::string LLPanelEnvironmentInfo::LBL_TIMEOFDAY("lbl_apparent_time"); const std::string LLPanelEnvironmentInfo::PNL_SETTINGS("pnl_environment_config"); @@ -107,6 +108,10 @@ const U32 LLPanelEnvironmentInfo::DIRTY_FLAG_MASK( const U32 ALTITUDE_SLIDER_COUNT = 3; const F32 ALTITUDE_DEFAULT_HEIGHT_STEP = 1000; +const U32 ALTITUDE_MARKERS_COUNT = 3; +const U32 ALTITUDE_PREFIXERS_COUNT = 5; + +const std::string slider_marker_base = "mark"; const std::string alt_sliders[] = { "sld1", @@ -175,7 +180,16 @@ BOOL LLPanelEnvironmentInfo::postBuild() mChangeMonitor = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env, S32 version) { onEnvironmentChanged(env, version); }); - getChild<LLSettingsDropTarget>(SDT_DROP_TARGET)->setPanel(this); + for (U32 idx = 0; idx < ALTITUDE_SLIDER_COUNT; idx++) + { + LLSettingsDropTarget* drop_target = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]); + if (drop_target) + { + drop_target->setPanel(this, alt_sliders[idx]); + } + } + getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[3])->setPanel(this, alt_prefixes[3]); + getChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[4])->setPanel(this, alt_prefixes[4]); return TRUE; } @@ -256,7 +270,7 @@ void LLPanelEnvironmentInfo::refresh() { sld->addSlider(altitudes[idx + 1], alt_sliders[idx]); updateAltLabel(alt_prefixes[idx], idx + 2, altitudes[idx + 1]); - mAltitudes[alt_sliders[idx]] = AltitudeData(idx+1, idx, altitudes[idx+1]); + mAltitudes[alt_sliders[idx]] = AltitudeData(idx+2, idx, altitudes[idx+1]); } if (sld->getCurNumSliders() != ALTITUDE_SLIDER_COUNT) { @@ -441,11 +455,29 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) getChild<LLUICtrl>(SLD_DAYOFFSET)->setEnabled(can_enable && !is_legacy); getChild<LLUICtrl>(SLD_ALTITUDES)->setEnabled(can_enable && isRegion() && !is_legacy); getChild<LLUICtrl>(ICN_GROUND)->setColor((can_enable && isRegion() && !is_legacy) ? LLColor4::white : LLColor4::grey % 0.8f); + getChild<LLUICtrl>(ICN_WATER)->setColor((can_enable && isRegion() && !is_legacy) ? LLColor4::white : LLColor4::grey % 0.8f); getChild<LLUICtrl>(BTN_RST_ALTITUDES)->setEnabled(can_enable && isRegion() && !is_legacy); getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setEnabled(can_enable && isRegion() && !is_legacy); getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setEnabled(can_enable && isRegion() && !is_legacy); - getChild<LLSettingsDropTarget>(SDT_DROP_TARGET)->setDndEnabled(enabled && !is_legacy); + for (U32 idx = 0; idx < ALTITUDE_MARKERS_COUNT; idx++) + { + LLUICtrl* marker = findChild<LLUICtrl>(slider_marker_base + llformat("%u", idx)); + if (marker) + { + static LLColor4 marker_color(0.75f, 0.75f, 0.75f, 1.f); + marker->setColor((can_enable && isRegion() && !is_legacy) ? marker_color : marker_color % 0.3f); + } + } + + for (U32 idx = 0; idx < ALTITUDE_PREFIXERS_COUNT; idx++) + { + LLSettingsDropTarget* drop_target = findChild<LLSettingsDropTarget>("sdt_" + alt_prefixes[idx]); + if (drop_target) + { + drop_target->setDndEnabled(enabled && !is_legacy); + } + } return true; } @@ -606,7 +638,7 @@ void LLPanelEnvironmentInfo::onAltSliderCallback(LLUICtrl *cntrl, const LLSD &da while (iter != end) { iter2 = mAltitudes.begin(); - new_index = 1; + new_index = 2; while (iter2 != end) { if (iter->second.mAltitude > iter2->second.mAltitude) @@ -615,9 +647,9 @@ void LLPanelEnvironmentInfo::onAltSliderCallback(LLUICtrl *cntrl, const LLSD &da } iter2++; } - iter->second.mAltitudeIndex = new_index; + iter->second.mTrackIndex = new_index; - updateAltLabel(alt_prefixes[iter->second.mLabelIndex], iter->second.mAltitudeIndex + 1, iter->second.mAltitude); + updateAltLabel(alt_prefixes[iter->second.mLabelIndex], iter->second.mTrackIndex, iter->second.mAltitude); iter++; } @@ -756,7 +788,24 @@ void LLPanelEnvironmentInfo::onIdlePlay(void *data) ((LLPanelEnvironmentInfo *)data)->udpateApparentTimeOfDay(); } -void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id) + +void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id, std::string source) +{ + if (source == alt_prefixes[4]) + { + onPickerCommitted(item_id, 0); + } + else if (source == alt_prefixes[3]) + { + onPickerCommitted(item_id, 1); + } + else + { + onPickerCommitted(item_id, mAltitudes[source].mTrackIndex); + } +} + +void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id, S32 track_num) { LLInventoryItem *itemp = gInventory.getItem(item_id); if (itemp) @@ -764,7 +813,8 @@ void LLPanelEnvironmentInfo::onPickerCommitted(LLUUID item_id) LLHandle<LLPanel> that_h = getHandle(); LLEnvironment::instance().updateParcel(getParcelId(), itemp->getAssetUUID(), - itemp->getName(), + itemp->getName(), + track_num, -1, -1, LLEnvironment::altitudes_vect_t(), [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); }); } @@ -931,7 +981,8 @@ BOOL LLSettingsDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, *accept = ACCEPT_YES_COPY_SINGLE; if (drop) { - mEnvironmentInfoPanel->onPickerCommitted(item_id); + // might be better to use name of the element + mEnvironmentInfoPanel->onPickerCommitted(item_id, mTrack); } } } diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index 18ab64dc12..87ce0772b2 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -71,6 +71,7 @@ protected: static const std::string SLD_DAYOFFSET; static const std::string SLD_ALTITUDES; static const std::string ICN_GROUND; + static const std::string ICN_WATER; static const std::string CHK_ALLOWOVERRIDE; static const std::string BTN_APPLY; static const std::string BTN_CANCEL; @@ -122,7 +123,8 @@ protected: void udpateApparentTimeOfDay(); - void onPickerCommitted(LLUUID item_id); + void onPickerCommitted(LLUUID item_id, std::string source); + void onPickerCommitted(LLUUID item_id, S32 track_num = LLEnvironment::NO_TRACK); void onEditCommitted(LLSettingsDay::ptr_t newday); void onDayLenOffsetMouseUp(); @@ -153,13 +155,13 @@ protected: { public: AltitudeData() : - mAltitudeIndex(0), mLabelIndex(0), mAltitude(0) + mTrackIndex(0), mLabelIndex(0), mAltitude(0) {} - AltitudeData(U32 altitude_index, U32 label_index, F32 altitude) : - mAltitudeIndex(altitude_index), mLabelIndex(label_index), mAltitude(altitude) + AltitudeData(U32 track_index, U32 label_index, F32 altitude) : + mTrackIndex(track_index), mLabelIndex(label_index), mAltitude(altitude) {} - U32 mAltitudeIndex; + U32 mTrackIndex; U32 mLabelIndex; F32 mAltitude; }; @@ -210,11 +212,12 @@ public: void* cargo_data, EAcceptance* accept, std::string& tooltip_msg); - void setPanel(LLPanelEnvironmentInfo* panel) { mEnvironmentInfoPanel = panel; }; + void setPanel(LLPanelEnvironmentInfo* panel, std::string track) { mEnvironmentInfoPanel = panel; mTrack = track; }; void setDndEnabled(bool dnd_enabled) { mDndEnabled = dnd_enabled; }; protected: LLPanelEnvironmentInfo* mEnvironmentInfoPanel; + std::string mTrack; bool mDndEnabled; }; #endif // LL_LLPANELENVIRONMENT_H diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b4cfe9d1b5..9ca9d4cd51 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -11322,4 +11322,14 @@ Are you sure you want to continue? yestext="Yes"/> </notification> + <notification + icon="notify.tga" + name="NoEditFromLibrary" + persist="true" + type="alertmodal"> +You may not edit settings directly from the libary. +Please copy to your own inventory and try again. + <tag>fail</tag> + </notification> + </notifications> diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml index a39973fe3a..0c0ca2ac60 100644 --- a/indra/newview/skins/default/xui/en/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml @@ -2,7 +2,7 @@ <panel border="true" - follows="top|left" + follows="all" height="375" label="Environment" layout="topleft" @@ -22,6 +22,7 @@ <layout_stack width="530" height="367" + auto_resize="true" follows="all" layout="topleft" animate="false" @@ -57,297 +58,7 @@ auto_resize="true" user_resize="false" min_height="0" - top="5" - name="pnl_environment_altitudes" - visible="true"> - <text follows="top|left" - font="SansSerif" - halign="left" - text_color="white" - left="5" - top="2">Sky Altitudes</text> - <multi_slider - height="270" - follows="top|left" - orientation="vertical" - increment="25" - min_val="100" - max_val="4000" - thumb_image="Inv_SettingsSky" - thumb_width="17" - thumb_highlight_color="white" - decimal_digits="0" - draw_track="true" - overlap_threshold="100" - initial_value="0" - layout="topleft" - left="10" - max_sliders="3" - name="sld_altitudes" - show_text="false" - top_pad="20" - use_triangle="false" - width="17"> - <slider name="sld1" - value="1000"/> - <slider name="sld2" - value="2000"/> - <slider name="sld3" - value="3000"/> - </multi_slider> - <panel - follows="top|left" - height="21" - width="222" - layout="topleft" - visible="true" - left="10" - top_pad="10" - name="pnl_ground"> - <icon - follows="top|left" - height="17" - width="17" - image_name="Inv_SettingsSky" - layout="topleft" - name="icon_ground" - mouse_opaque="false" - visible="true" - top_pad="2" - left_delta="0"/> - <text - type="string" - length="1" - follows="left|top" - height="12" - layout="topleft" - left_pad="8" - top_delta="2" - width="50" - name="txt_ground"> - Ground - </text> - <line_editor - follows="top|right" - enabled="false" - top_delta="-3" - right="-5" - xxxleft="-160" - height="20" - layout="topleft" - name="edt_invname_ground" - width="155"> - Unknown - </line_editor> - <settings_drop_target - height="20" - top_delta="0" - left_delta="0" - follows="top|left" - layout="topleft" - name="sdt_ground" - tool_tip="Drag a setting from Inventory onto this target box to select it as the ground level sky." - width="155" /> - </panel> - <panel - follows="top|left" - height="21" - width="222" - layout="topleft" - visible="true" - left="10" - top_pad="10" - name="pnl_water"> - <icon - follows="left|top" - height="17" - width="17" - image_name="Inv_SettingsWater" - layout="topleft" - name="icon_water" - mouse_opaque="false" - visible="true" - top_pad="2" - left_delta="0"/> - <text - type="string" - length="1" - follows="left|top" - height="12" - layout="topleft" - left_pad="8" - top_delta="2" - width="200" - name="txt_water"> - Water - </text> - <line_editor - follows="top|right" - enabled="false" - top_delta="-3" - right="-5" - xxxleft="-160" - height="20" - layout="topleft" - name="edt_invname_water" - width="155"> - Unknown - </line_editor> - <settings_drop_target - height="20" - top_delta="0" - left_delta="0" - follows="top|left" - layout="topleft" - name="sdt_water" - tool_tip="Drag a setting from Inventory onto this target box to select it as current water." - width="155" /> - </panel> - <button - follows="top|left" - layout="topleft" - height="23" - width="100" - label="Reset" - left_pad="-90" - top_pad="4" - tool_tip="Reset to default altitudes" - name="btn_rst_altitudes" /> - <panel - follows="top|left" - height="21" - width="205" - layout="topleft" - visible="true" - left="35" - top="30" - name="pnl_alt1"> - <text - type="string" - length="1" - follows="left" - height="12" - layout="topleft" - top_pad="5" - left_delta="0" - width="200" - name="txt_alt1"> - Sky [INDEX]([ALTITUDE]m) - </text> - <line_editor - follows="top|right" - enabled="false" - top_delta="-3" - right="-5" - xxxleft="-160" - height="20" - layout="topleft" - name="edt_invname_alt1" - width="155"> - Unknown - </line_editor> - <settings_drop_target - height="20" - top_delta="0" - left_delta="0" - follows="top|left" - layout="topleft" - name="sdt_alt2" - tool_tip="Drag a setting from Inventory onto this target box to select it as current water." - width="155" /> - </panel> - <panel - follows="top|left" - height="21" - width="205" - layout="topleft" - visible="true" - left="35" - top="50" - name="pnl_alt2"> - <text - type="string" - length="1" - follows="left|top" - height="12" - layout="topleft" - top_pad="5" - left_delta="0" - width="200" - name="txt_alt2"> - Sky [INDEX]([ALTITUDE]m) - </text> - <line_editor - follows="top|right" - enabled="false" - top_delta="-3" - right="-5" - xxxleft="-160" - height="20" - layout="topleft" - name="edt_invname_alt2" - width="155"> - Unknown - </line_editor> - <settings_drop_target - height="20" - top_delta="0" - left_delta="0" - follows="top|left" - layout="topleft" - name="sdt_alt2" - tool_tip="Drag a setting from Inventory onto this target box to select it as current water." - width="155" /> - </panel> - <panel - follows="top|left" - height="21" - width="205" - layout="topleft" - visible="true" - left="35" - top="70" - name="pnl_alt3"> - <text - type="string" - length="1" - follows="left|top" - height="12" - layout="topleft" - top_pad="5" - left_delta="0" - width="200" - name="txt_alt3"> - Sky [INDEX]([ALTITUDE]m) - </text> - <line_editor - follows="top|right" - enabled="false" - top_delta="-3" - right="-5" - xxxleft="-160" - height="20" - layout="topleft" - name="edt_invname_alt3" - width="155"> - Unknown - </line_editor> - <settings_drop_target - height="20" - top_delta="0" - left_delta="0" - follows="top|left" - layout="topleft" - name="sdt_alt3" - tool_tip="Drag a setting from Inventory onto this target box to select it as current water." - width="155" /> - </panel> - </layout_panel> - <layout_panel - auto_resize="true" - user_resize="false" - min_height="0" - top="5" + top="0" name="pnl_environment_config" visible="true"> <layout_stack @@ -365,6 +76,7 @@ font="SansSerif" halign="left" text_color="white" + left="5" top="2">Select Environment</text> <button follows="top|left" @@ -413,6 +125,7 @@ follows="top|left|right" halign="left" text_color="white" + left="5" top="2">Day Settings</text> <text type="string" @@ -427,19 +140,20 @@ </text> <slider can_edit_text="true" + auto_resize="true" decimal_digits="1" - follows="left|top" - height="20" - increment="0.5" - initial_value="4" + follows="top|left|right" layout="topleft" - left_delta="0" - xxxright="-10" + increment="0.5" + height="20" + width="237" + left="10" top_pad="0" + right="-10" + initial_value="4" name="sld_day_length" min_val="4" - max_val="168" - width="237" /> + max_val="168" /> <text type="string" length="1" @@ -454,17 +168,18 @@ <slider can_edit_text="true" decimal_digits="1" - follows="left|top" + follows="top|left|right" + layout="topleft" height="20" + width="237" increment="0.5" initial_value="-8" - layout="topleft" - left_delta="0" + left="10" top_pad="0" + right="-10" name="sld_day_offset" min_val="-11.5" - max_val="12" - width="237" /> + max_val="12" /> <text type="string" length="1" @@ -499,6 +214,332 @@ </layout_panel> </layout_stack> </layout_panel> + <layout_panel + auto_resize="true" + user_resize="false" + min_height="0" + top="0" + name="pnl_environment_altitudes" + visible="true"> + <!-- Three movable panels first so that they will be 'below' slider--> + <panel + follows="top|left" + height="26" + width="360" + layout="topleft" + visible="true" + left="1" + top="30" + name="pnl_alt1"> + <text + type="string" + length="1" + follows="left|top" + layout="topleft" + height="24" + width="52" + left_delta="2" + top_pad="1" + halign="right" + name="txt_alt1"> + Sky [INDEX] + [ALTITUDE]m + </text> + <line_editor + follows="left|top" + enabled="false" + top_delta="3" + left_pad="21" + xxxleft="-160" + height="20" + layout="topleft" + name="edt_invname_alt1" + width="155"> + Unknown + </line_editor> + <settings_drop_target + height="20" + top_delta="0" + left_delta="0" + follows="top|left" + layout="topleft" + name="sdt_alt1" + tool_tip="Drag a setting from Inventory onto this target box to select it as current sky." + width="155" /> + </panel> + <panel + follows="top|left" + height="26" + width="360" + layout="topleft" + visible="true" + left="1" + top="60" + name="pnl_alt2"> + <text + type="string" + length="1" + follows="left|top" + layout="topleft" + height="24" + width="52" + left_delta="2" + top_pad="1" + halign="right" + name="txt_alt2"> + Sky [INDEX] + [ALTITUDE]m + </text> + <line_editor + follows="left|top" + enabled="false" + top_delta="3" + left_pad="21" + xxxleft="-160" + height="20" + layout="topleft" + name="edt_invname_alt2" + width="155"> + Unknown + </line_editor> + <settings_drop_target + height="20" + top_delta="0" + left_delta="0" + follows="top|left" + layout="topleft" + name="sdt_alt2" + tool_tip="Drag a setting from Inventory onto this target box to select it as current sky." + width="155" /> + </panel> + <panel + follows="top|left" + height="26" + width="360" + layout="topleft" + visible="true" + left="1" + top="90" + name="pnl_alt3"> + <text + type="string" + length="1" + follows="left|top" + layout="topleft" + height="25" + width="52" + left_delta="2" + top_pad="1" + halign="right" + name="txt_alt3"> + Sky [INDEX] + [ALTITUDE]m + </text> + <line_editor + follows="left|top" + enabled="false" + top_delta="3" + left_pad="21" + xxxleft="-160" + height="20" + layout="topleft" + name="edt_invname_alt3" + width="155"> + Unknown + </line_editor> + <settings_drop_target + height="20" + top_delta="0" + left_delta="0" + follows="top|left" + layout="topleft" + name="sdt_alt3" + tool_tip="Drag a setting from Inventory onto this target box to select it as current sky." + width="155" /> + </panel> + <text follows="top|left" + font="SansSerif" + halign="left" + text_color="white" + left="5" + top="2">Sky Altitudes</text> + <!-- Divider icons also should be under slider to not interfer with clicks--> + <icon + color="LtGray" + height="2" + width="17" + image_name="Rounded_Square" + layout="topleft" + left="57" + top="89" + name="mark0"/> + <icon + color="LtGray" + height="2" + width="17" + image_name="Rounded_Square" + layout="topleft" + left_delta="0" + top_delta="69" + name="mark1"/> + <icon + color="LtGray" + height="2" + width="17" + image_name="Rounded_Square" + layout="topleft" + left_delta="0" + top_delta="69" + name="mark2"/> + <multi_slider + height="270" + follows="top|left" + orientation="vertical" + increment="25" + min_val="100" + max_val="4000" + thumb_image="Inv_SettingsSky" + thumb_width="17" + thumb_highlight_color="white" + decimal_digits="0" + draw_track="true" + overlap_threshold="100" + initial_value="0" + layout="topleft" + left="57" + max_sliders="3" + name="sld_altitudes" + show_text="false" + top="20" + use_triangle="false" + width="17"> + <slider name="sld1" + value="1000"/> + <slider name="sld2" + value="2000"/> + <slider name="sld3" + value="3000"/> + </multi_slider> + <panel + follows="top|left" + height="21" + width="360" + layout="topleft" + visible="true" + left="1" + top_pad="10" + name="pnl_ground"> + <text + type="string" + length="1" + follows="left|top" + layout="topleft" + height="12" + width="52" + left_delta="2" + top_pad="2" + halign="right" + name="txt_ground"> + Ground + </text> + <icon + follows="top|left" + height="17" + width="17" + image_name="Inv_SettingsSky" + layout="topleft" + name="icon_ground" + mouse_opaque="false" + visible="true" + top_delta="-3" + left_pad="2"/> + <line_editor + follows="left|top" + enabled="false" + top_delta="-1" + left_pad="2" + xxxleft="-160" + height="20" + layout="topleft" + name="edt_invname_ground" + width="155"> + Unknown + </line_editor> + <settings_drop_target + height="20" + top_delta="0" + left_delta="0" + follows="top|left" + layout="topleft" + name="sdt_ground" + tool_tip="Drag a setting from Inventory onto this target box to select it as the ground level sky." + width="155" /> + </panel> + <panel + follows="top|left" + height="21" + width="360" + layout="topleft" + visible="true" + left="1" + top_pad="10" + name="pnl_water"> + <text + type="string" + length="1" + follows="left|top" + layout="topleft" + height="12" + width="52" + left_delta="2" + top_pad="2" + halign="right" + name="txt_water"> + Water + </text> + <icon + follows="left|top" + height="17" + width="17" + image_name="Inv_SettingsWater" + layout="topleft" + name="icon_water" + mouse_opaque="false" + visible="true" + top_delta="-3" + left_pad="2"/> + <line_editor + follows="left|top" + enabled="false" + top_delta="-1" + left_pad="2" + height="20" + layout="topleft" + name="edt_invname_water" + width="155"> + Unknown + </line_editor> + <settings_drop_target + height="20" + top_delta="0" + left_delta="0" + follows="top|left" + layout="topleft" + name="sdt_water" + tool_tip="Drag a setting from Inventory onto this target box to select it as current water." + width="155" /> + </panel> + <button + follows="top|right" + layout="topleft" + height="23" + width="100" + label="Reset" + right="-10" + top_pad="4" + tool_tip="Reset to default altitudes" + name="btn_rst_altitudes" /> + </layout_panel> </layout_stack> </layout_panel> <!-- |