diff options
Diffstat (limited to 'indra')
19 files changed, 825 insertions, 540 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 192be979fb..d1b0aae542 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -255,6 +255,7 @@ set(viewer_SOURCE_FILES llfloaterlagmeter.cpp llfloaterland.cpp llfloaterlandholdings.cpp + llfloaterloadprefpreset.cpp llfloatermap.cpp llfloatermediasettings.cpp llfloatermemleak.cpp @@ -866,6 +867,7 @@ set(viewer_HEADER_FILES llfloaterlagmeter.h llfloaterland.h llfloaterlandholdings.h + llfloaterloadprefpreset.h llfloatermap.h llfloatermediasettings.h llfloatermemleak.h diff --git a/indra/newview/llfloaterdeleteprefpreset.cpp b/indra/newview/llfloaterdeleteprefpreset.cpp index f147a5ee90..68b107a1aa 100644 --- a/indra/newview/llfloaterdeleteprefpreset.cpp +++ b/indra/newview/llfloaterdeleteprefpreset.cpp @@ -1,5 +1,5 @@ /** - * @file llfloaterdeletprefpreset.cpp + * @file llfloaterdeleteprefpreset.cpp * @brief Floater to delete a graphics / camera preset * * $LicenseInfo:firstyear=2014&license=viewerlgpl$ @@ -67,20 +67,14 @@ void LLFloaterDeletePrefPreset::onBtnDelete() LLComboBox* combo = getChild<LLComboBox>("preset_combo"); std::string name = combo->getSimple(); - if (LLPresetsManager::getInstance()->deletePreset(mSubdirectory, name)) - { - // If you delete the active preset (which should never happen) then recreate it. - if (name == gSavedSettings.getString("PresetGraphicActive")) - { - LLPresetsManager::getInstance()->savePreset(mSubdirectory, PRESETS_DEFAULT); - } - } - else + if (!LLPresetsManager::getInstance()->deletePreset(mSubdirectory, name)) { LLSD args; args["NAME"] = name; LLNotificationsUtil::add("PresetNotDeleted", args); } + + closeFloater(); } void LLFloaterDeletePrefPreset::onPresetsListChange() diff --git a/indra/newview/llfloaterloadprefpreset.cpp b/indra/newview/llfloaterloadprefpreset.cpp new file mode 100644 index 0000000000..d831da43f5 --- /dev/null +++ b/indra/newview/llfloaterloadprefpreset.cpp @@ -0,0 +1,87 @@ +/** + * @file llfloateloadprefpreset.cpp + * @brief Floater to load a graphics / camera preset + * + * $LicenseInfo:firstyear=2015&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2015, 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 "llfloaterloadprefpreset.h" + +#include "llbutton.h" +#include "llcombobox.h" +#include "llfloaterpreference.h" +#include "llfloaterreg.h" +#include "llpresetsmanager.h" +#include "llviewercontrol.h" + +LLFloaterLoadPrefPreset::LLFloaterLoadPrefPreset(const LLSD &key) +: LLFloater(key) +{ +} + +// virtual +BOOL LLFloaterLoadPrefPreset::postBuild() +{ + getChild<LLButton>("ok")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnOk, this)); + getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterLoadPrefPreset::onBtnCancel, this)); + LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterLoadPrefPreset::onPresetsListChange, this)); + + return TRUE; +} + +void LLFloaterLoadPrefPreset::onOpen(const LLSD& key) +{ + mSubdirectory = key.asString(); + std::string floater_title = getString(std::string("title_") + mSubdirectory); + + setTitle(floater_title); + + LLComboBox* combo = getChild<LLComboBox>("preset_combo"); + + EDefaultOptions option = DEFAULT_TOP; + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); +} + +void LLFloaterLoadPrefPreset::onPresetsListChange() +{ + LLComboBox* combo = getChild<LLComboBox>("preset_combo"); + + EDefaultOptions option = DEFAULT_TOP; + LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, combo, option); +} + +void LLFloaterLoadPrefPreset::onBtnCancel() +{ + closeFloater(); +} + +void LLFloaterLoadPrefPreset::onBtnOk() +{ + LLComboBox* combo = getChild<LLComboBox>("preset_combo"); + std::string name = combo->getSimple(); + + LLPresetsManager::getInstance()->loadPreset(mSubdirectory, name); + + closeFloater(); +} diff --git a/indra/newview/llfloaterloadprefpreset.h b/indra/newview/llfloaterloadprefpreset.h new file mode 100644 index 0000000000..9471f6f1e1 --- /dev/null +++ b/indra/newview/llfloaterloadprefpreset.h @@ -0,0 +1,53 @@ +/** + * @file llfloaterloadprefpreset.h + * @brief Floater to load a graphics / camera preset + + * + * $LicenseInfo:firstyear=2015&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2015, 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_LLFLOATERLOADPREFPRESET_H +#define LL_LLFLOATERLOADPREFPRESET_H + +#include "llfloater.h" + +class LLComboBox; + +class LLFloaterLoadPrefPreset : public LLFloater +{ + +public: + LLFloaterLoadPrefPreset(const LLSD &key); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onOpen(const LLSD& key); + + void onBtnOk(); + void onBtnCancel(); + +private: + void onPresetsListChange(); + + std::string mSubdirectory; +}; + +#endif // LL_LLFLOATERLOADPREFPRESET_H diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 9df7f82275..5938566b0a 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -341,6 +341,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this)); mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this)); mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this)); + mCommitCallbackRegistrar.add("Pref.AvatarImpostorsEnable", boost::bind(&LLFloaterPreference::onAvatarImpostorsEnable, this)); mCommitCallbackRegistrar.add("Pref.VertexShaderEnable", boost::bind(&LLFloaterPreference::onVertexShaderEnable, this)); mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this)); mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::refreshUI,this)); @@ -734,11 +735,11 @@ void LLFloaterPreference::onOpen(const LLSD& key) bool started = (LLStartUp::getStartupState() == STATE_STARTED); - LLComboBox* combo = getChild<LLComboBox>("graphic_preset_combo"); - LLButton* save_btn = findChild<LLButton>("PrefSaveButton"); - LLButton* delete_btn = findChild<LLButton>("PrefDeleteButton"); + LLButton* load_btn = findChild<LLButton>("PrefLoadButton"); + LLButton* save_btn = findChild<LLButton>("PrefSaveButton"); + LLButton* delete_btn = findChild<LLButton>("PrefDeleteButton"); - combo->setEnabled(started); + load_btn->setEnabled(started); save_btn->setEnabled(started); delete_btn->setEnabled(started); } @@ -748,6 +749,11 @@ void LLFloaterPreference::onVertexShaderEnable() refreshEnabledGraphics(); } +void LLFloaterPreference::onAvatarImpostorsEnable() +{ + refreshEnabledGraphics(); +} + //static void LLFloaterPreference::initDoNotDisturbResponse() { @@ -783,8 +789,6 @@ void LLFloaterPreference::setHardwareDefaults() if (panel) panel->setHardwareDefaults(); } - - LLPresetsManager::getInstance()->savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT); } void LLFloaterPreference::getControlNames(std::vector<std::string>& names) @@ -893,11 +897,6 @@ void LLFloaterPreference::onBtnOK() LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get(); pPathfindingConsole->onRegionBoundaryCross(); } - - // Write settings to currently defined preset. This will recreate a missing preset file - // and ensure the preset file matches the current settings (which may have been changed - // via some other means). - LLPresetsManager::getInstance()->savePreset(PRESETS_GRAPHIC, gSavedSettings.getString("PresetGraphicActive")); } // static @@ -926,14 +925,12 @@ void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_ } } - void LLFloaterPreference::refreshEnabledGraphics() { LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); if (instance) { instance->refresh(); - //instance->refreshEnabledState(); } } @@ -1117,7 +1114,7 @@ void LLFloaterPreference::buildPopupLists() void LLFloaterPreference::refreshEnabledState() { - LLUICtrl* ctrl_reflections = getChild<LLUICtrl>("Reflections"); + LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections"); LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText"); // Reflections @@ -1150,11 +1147,11 @@ void LLFloaterPreference::refreshEnabledState() if (gSavedSettings.getBOOL("VertexShaderEnable") == FALSE || gSavedSettings.getBOOL("RenderAvatarVP") == FALSE) { - ctrl_avatar_cloth->setEnabled(false); + ctrl_avatar_cloth->setEnabled(FALSE); } else { - ctrl_avatar_cloth->setEnabled(true); + ctrl_avatar_cloth->setEnabled(TRUE); } // Vertex Shaders @@ -1170,22 +1167,24 @@ void LLFloaterPreference::refreshEnabledState() { terrain_detail->setValue(1); terrain_detail->setEnabled(FALSE); - terrain_text->setEnabled(false); + terrain_text->setEnabled(FALSE); } else { terrain_detail->setEnabled(TRUE); - terrain_text->setEnabled(true); + terrain_text->setEnabled(TRUE); } // WindLight LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders"); + LLCheckBoxCtrl* ctrl_wind_light2 = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders2"); LLSliderCtrl* sky = getChild<LLSliderCtrl>("SkyMeshDetail"); LLTextBox* sky_text = getChild<LLTextBox>("SkyMeshDetailText"); // *HACK just checks to see if we can use shaders... // maybe some cards that use shaders, but don't support windlight ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders); + ctrl_wind_light2->setEnabled(ctrl_shader_enable->getEnabled() && shaders); sky->setEnabled(ctrl_wind_light->get() && shaders); sky_text->setEnabled(ctrl_wind_light->get() && shaders); @@ -1207,7 +1206,7 @@ void LLFloaterPreference::refreshEnabledState() LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF"); - LLUICtrl* ctrl_shadow = getChild<LLUICtrl>("ShadowDetail"); + LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail"); LLTextBox* shadow_text = getChild<LLTextBox>("RenderShadowDetailText"); // note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it @@ -1223,6 +1222,13 @@ void LLFloaterPreference::refreshEnabledState() ctrl_shadow->setEnabled(enabled); shadow_text->setEnabled(enabled); + LLTextBox* maximum_arc_text = getChild<LLTextBox>("MaximumARCText"); + + enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseImpostors") && gSavedSettings.getBOOL("RenderUseImpostors"); + getChildView("MaximumARC")->setEnabled(enabled); + maximum_arc_text->setEnabled(enabled); + getChildView("MaxNumberAvatarDrawn")->setEnabled(enabled); + // Hardware settings F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple"); S32Megabytes min_tex_mem = LLViewerTextureList::getMinVideoRamSetting(); @@ -1290,16 +1296,19 @@ void LLFloaterPreference::refreshEnabledState() void LLFloaterPreference::disableUnavailableSettings() { - LLUICtrl* ctrl_reflections = getChild<LLUICtrl>("Reflections"); + LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections"); LLTextBox* reflections_text = getChild<LLTextBox>("ReflectionsText"); LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram"); LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth"); LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders"); LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders"); LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors"); + LLSliderCtrl* ctrl_maximum_arc = getChild<LLSliderCtrl>("MaximumARC"); + LLTextBox* maximum_arc_text = getChild<LLTextBox>("MaximumARCText"); + LLSliderCtrl* ctrl_max_visible = getChild<LLSliderCtrl>("MaxNumberAvatarDrawn"); LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders"); LLCheckBoxCtrl* ctrl_deferred2 = getChild<LLCheckBoxCtrl>("UseLightShaders2"); - LLUICtrl* ctrl_shadows = getChild<LLUICtrl>("ShadowDetail"); + LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail"); LLTextBox* shadows_text = getChild<LLTextBox>("RenderShadowDetailText"); LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO"); LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF"); @@ -1315,12 +1324,12 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_wind_light->setEnabled(FALSE); ctrl_wind_light->setValue(FALSE); - sky->setEnabled(false); - sky_text->setEnabled(false); + sky->setEnabled(FALSE); + sky_text->setEnabled(FALSE); ctrl_reflections->setEnabled(FALSE); ctrl_reflections->setValue(0); - reflections_text->setEnabled(false); + reflections_text->setEnabled(FALSE); ctrl_avatar_vp->setEnabled(FALSE); ctrl_avatar_vp->setValue(FALSE); @@ -1330,7 +1339,7 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - shadows_text->setEnabled(false); + shadows_text->setEnabled(FALSE); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); @@ -1350,13 +1359,13 @@ void LLFloaterPreference::disableUnavailableSettings() ctrl_wind_light->setEnabled(FALSE); ctrl_wind_light->setValue(FALSE); - sky->setEnabled(false); - sky_text->setEnabled(false); + sky->setEnabled(FALSE); + sky_text->setEnabled(FALSE); //deferred needs windlight, disable deferred ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - shadows_text->setEnabled(false); + shadows_text->setEnabled(FALSE); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); @@ -1376,7 +1385,7 @@ void LLFloaterPreference::disableUnavailableSettings() { ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - shadows_text->setEnabled(false); + shadows_text->setEnabled(FALSE); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); @@ -1402,7 +1411,7 @@ void LLFloaterPreference::disableUnavailableSettings() { ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - shadows_text->setEnabled(false); + shadows_text->setEnabled(FALSE); } // disabled reflections @@ -1410,7 +1419,7 @@ void LLFloaterPreference::disableUnavailableSettings() { ctrl_reflections->setEnabled(FALSE); ctrl_reflections->setValue(FALSE); - reflections_text->setEnabled(false); + reflections_text->setEnabled(FALSE); } // disabled av @@ -1425,7 +1434,7 @@ void LLFloaterPreference::disableUnavailableSettings() //deferred needs AvatarVP, disable deferred ctrl_shadows->setEnabled(FALSE); ctrl_shadows->setValue(0); - shadows_text->setEnabled(false); + shadows_text->setEnabled(FALSE); ctrl_ssao->setEnabled(FALSE); ctrl_ssao->setValue(FALSE); @@ -1451,6 +1460,9 @@ void LLFloaterPreference::disableUnavailableSettings() { ctrl_avatar_impostors->setEnabled(FALSE); ctrl_avatar_impostors->setValue(FALSE); + ctrl_maximum_arc->setEnabled(FALSE); + maximum_arc_text->setEnabled(FALSE); + ctrl_max_visible->setEnabled(FALSE); } } @@ -1469,15 +1481,12 @@ void LLFloaterPreference::refresh() updateSliderText(getChild<LLSliderCtrl>("FlexibleMeshDetail", true), getChild<LLTextBox>("FlexibleMeshDetailText", true)); updateSliderText(getChild<LLSliderCtrl>("TreeMeshDetail", true), getChild<LLTextBox>("TreeMeshDetailText", true)); updateSliderText(getChild<LLSliderCtrl>("AvatarMeshDetail", true), getChild<LLTextBox>("AvatarMeshDetailText", true)); - updateSliderText(getChild<LLSliderCtrl>("AvatarMeshDetail2", true), getChild<LLTextBox>("AvatarMeshDetailText2", true)); updateSliderText(getChild<LLSliderCtrl>("AvatarPhysicsDetail", true), getChild<LLTextBox>("AvatarPhysicsDetailText", true)); updateSliderText(getChild<LLSliderCtrl>("TerrainMeshDetail", true), getChild<LLTextBox>("TerrainMeshDetailText", true)); updateSliderText(getChild<LLSliderCtrl>("RenderPostProcess", true), getChild<LLTextBox>("PostProcessText", true)); updateSliderText(getChild<LLSliderCtrl>("SkyMeshDetail", true), getChild<LLTextBox>("SkyMeshDetailText", true)); updateSliderText(getChild<LLSliderCtrl>("TerrainDetail", true), getChild<LLTextBox>("TerrainDetailText", true)); - updateSliderText(getChild<LLSliderCtrl>("MaximumARC", true), getChild<LLTextBox>("MaximumARCText", true)); - updateSliderText(getChild<LLSliderCtrl>("Reflections", true), getChild<LLTextBox>("ReflectionsText", true)); - updateSliderText(getChild<LLSliderCtrl>("ShadowDetail", true), getChild<LLTextBox>("RenderShadowDetailText", true)); + updateMaximumArcText(getChild<LLSliderCtrl>("MaximumARC", true), getChild<LLTextBox>("MaximumARCText", true)); } void LLFloaterPreference::onCommitWindowedMode() @@ -1733,22 +1742,6 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b { if (text_box == NULL || ctrl== NULL) return; - - std::string name = ctrl->getName(); - - if ("ShadowDetail" == name) - { - U32 value = (U32)ctrl->getValue().asInteger(); - text_box->setText(getString("RenderShadowDetail" + llformat("%d", value))); - return; - } - - if ("Reflections" == name) - { - U32 value = (U32)ctrl->getValue().asInteger(); - text_box->setText(getString("Reflections" + llformat("%d", value))); - return; - } // get range and points when text should change F32 value = (F32)ctrl->getValue().asReal(); @@ -1772,35 +1765,42 @@ void LLFloaterPreference::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_b { text_box->setText(LLTrans::getString("GraphicsQualityHigh")); } +} + +void LLFloaterPreference::updateMaximumArcText(LLSliderCtrl* ctrl, LLTextBox* text_box) +{ + F32 min_result = 20000.0f; + F32 max_result = 300000.0f; - if ("MaximumARC" == name) + F32 value = (F32)ctrl->getValue().asReal(); + + if (101.0f == value) + { + // It has been decided that having the slider all the way to the right will be the off position, which + // is a value of 101, so it is necessary to change value to 0 disable impostor generation. + value = 0.0f; + text_box->setText(LLTrans::getString("Off")); + } + else { - F32 control_value = value; - if (0.0f == control_value) - { - text_box->setText(LLTrans::getString("Off")); - } - else - { - // 100 is the maximum value of this control set in panel_preferences_graphics1.xml - F32 minp = 0.0f; - F32 maxp = 100.0f; - // The result should be between 20,000 and 500,000 - F32 minv = log(20000.0f); - F32 maxv = log(500000.0f); + // 100 is the maximum value of this control set in panel_preferences_graphics1.xml + F32 minp = 1.0f; + F32 maxp = 100.0f; - // calculate adjustment factor - F32 scale = (maxv - minv) / (maxp - minp); + // The result should be between min_result and max_result + F32 minv = log(min_result); + F32 maxv = log(max_result); - control_value = exp(minv + scale * (control_value - minp)); + // calculate adjustment factor + F32 scale = (maxv - minv) / (maxp - minp); - // Invert result - control_value = 500000.0f - control_value; - } + value = exp(minv + scale * (value - minp)); - gSavedSettings.setU32("RenderAutoMuteRenderWeightLimit", (U32)control_value); + text_box->setText(llformat("%0.0f", value)); } + + gSavedSettings.setU32("RenderAutoMuteRenderWeightLimit", (U32)value); } void LLFloaterPreference::onChangeMaturity() @@ -2002,9 +2002,9 @@ LLPanelPreference::LLPanelPreference() { mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2)); mCommitCallbackRegistrar.add("Pref.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelPreference::updateMediaAutoPlayCheckbox, this, _1)); - mCommitCallbackRegistrar.add("Pref.Preset", boost::bind(&LLPanelPreference::onChangePreset, this, _2)); - mCommitCallbackRegistrar.add("Pref.PrefDelete", boost::bind(&LLPanelPreference::DeletePreset, this, _2)); - mCommitCallbackRegistrar.add("Pref.PrefSave", boost::bind(&LLPanelPreference::SavePreset, this, _2)); + mCommitCallbackRegistrar.add("Pref.PrefDelete", boost::bind(&LLPanelPreference::deletePreset, this, _2)); + mCommitCallbackRegistrar.add("Pref.PrefSave", boost::bind(&LLPanelPreference::savePreset, this, _2)); + mCommitCallbackRegistrar.add("Pref.PrefLoad", boost::bind(&LLPanelPreference::loadPreset, this, _2)); } //virtual @@ -2202,31 +2202,22 @@ void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) } } -void LLPanelPreference::DeletePreset(const LLSD& user_data) +void LLPanelPreference::deletePreset(const LLSD& user_data) { std::string subdirectory = user_data.asString(); LLFloaterReg::showInstance("delete_pref_preset", subdirectory); } -void LLPanelPreference::SavePreset(const LLSD& user_data) +void LLPanelPreference::savePreset(const LLSD& user_data) { std::string subdirectory = user_data.asString(); LLFloaterReg::showInstance("save_pref_preset", subdirectory); } -void LLPanelPreference::onChangePreset(const LLSD& user_data) +void LLPanelPreference::loadPreset(const LLSD& user_data) { std::string subdirectory = user_data.asString(); - - LLComboBox* combo = getChild<LLComboBox>(subdirectory + "_preset_combo"); - std::string name = combo->getSimple(); - - LLPresetsManager::getInstance()->loadPreset(subdirectory, name); - LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); - if (instance) - { - instance->refreshEnabledGraphics(); - } + LLFloaterReg::showInstance("load_pref_preset", subdirectory); } void LLPanelPreference::setHardwareDefaults() @@ -2288,27 +2279,51 @@ BOOL LLPanelPreferenceGraphics::postBuild() } #endif - LLComboBox* combo = getChild<LLComboBox>("graphic_preset_combo"); - combo->setLabel(LLTrans::getString("preset_combo_label")); - - setPresetNamesInComboBox(); + resetDirtyChilds(); + setPresetText(); LLPresetsManager::instance().setPresetListChangeCallback(boost::bind(&LLPanelPreferenceGraphics::onPresetsListChange, this)); return LLPanelPreference::postBuild(); } +void LLPanelPreferenceGraphics::draw() +{ + setPresetText(); + LLPanelPreference::draw(); +} + void LLPanelPreferenceGraphics::onPresetsListChange() { - setPresetNamesInComboBox(); + resetDirtyChilds(); + setPresetText(); } -void LLPanelPreferenceGraphics::setPresetNamesInComboBox() +void LLPanelPreferenceGraphics::setPresetText() { - LLComboBox* combo = getChild<LLComboBox>("graphic_preset_combo"); + LLTextBox* preset_text = getChild<LLTextBox>("preset_text"); + + std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive"); + + if (hasDirtyChilds() && !preset_graphic_active.empty()) + { + gSavedSettings.setString("PresetGraphicActive", ""); + preset_graphic_active.clear(); + // This doesn't seem to cause an infinite recursion. This trigger is needed to cause the pulldown + // panel to update. + LLPresetsManager::getInstance()->triggerChangeSignal(); + } + + if (!preset_graphic_active.empty()) + { + preset_text->setText(preset_graphic_active); + } + else + { + preset_text->setText(LLTrans::getString("none_paren_cap")); + } - EDefaultOptions option = DEFAULT_SHOW; - LLPresetsManager::getInstance()->setPresetNamesInComboBox(PRESETS_GRAPHIC, combo, option); + preset_text->resetDirty(); } bool LLPanelPreferenceGraphics::hasDirtyChilds() @@ -2325,7 +2340,17 @@ bool LLPanelPreferenceGraphics::hasDirtyChilds() if (ctrl) { if (ctrl->isDirty()) - return true; + { + LLControlVariable* control = ctrl->getControlVariable(); + if (control) + { + std::string control_name = control->getName(); + if (!control_name.empty()) + { + return true; + } + } + } } // Push children onto the end of the work stack for (child_list_t::const_iterator iter = curview->getChildList()->begin(); @@ -2333,7 +2358,8 @@ bool LLPanelPreferenceGraphics::hasDirtyChilds() { view_stack.push_back(*iter); } - } + } + return false; } @@ -2363,7 +2389,6 @@ void LLPanelPreferenceGraphics::resetDirtyChilds() void LLPanelPreferenceGraphics::cancel() { - resetDirtyChilds(); LLPanelPreference::cancel(); } void LLPanelPreferenceGraphics::saveSettings() diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index f6b5f5229d..2810a1008b 100755 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -116,6 +116,8 @@ protected: void setRecommended(); // callback for when client turns on shaders void onVertexShaderEnable(); + // callback for when client turns on impostors + void onAvatarImpostorsEnable(); // callback for commit in the "Single click on land" and "Double click on land" comboboxes. void onClickActionChange(); @@ -157,6 +159,7 @@ public: void onChangeQuality(const LLSD& data); void updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box); + void updateMaximumArcText(LLSliderCtrl* ctrl, LLTextBox* text_box); void refreshUI(); void onCommitParcelMediaAutoPlayEnable(); @@ -219,9 +222,9 @@ public: // cancel() can restore them. virtual void saveSettings(); - void onChangePreset(const LLSD& user_data); - void DeletePreset(const LLSD& user_data); - void SavePreset(const LLSD& user_data); + void deletePreset(const LLSD& user_data); + void savePreset(const LLSD& user_data); + void loadPreset(const LLSD& user_data); class Updater; @@ -245,15 +248,20 @@ class LLPanelPreferenceGraphics : public LLPanelPreference { public: BOOL postBuild(); + void draw(); void cancel(); void saveSettings(); + void resetDirtyChilds(); void setHardwareDefaults(); - void setPresetNamesInComboBox(); + void setPresetText(); + static const std::string getPresetsPath(); protected: bool hasDirtyChilds(); - void resetDirtyChilds(); + +private: + void onPresetsListChange(); }; diff --git a/indra/newview/llfloatersaveprefpreset.cpp b/indra/newview/llfloatersaveprefpreset.cpp index 610c701d8d..686a2f3269 100644 --- a/indra/newview/llfloatersaveprefpreset.cpp +++ b/indra/newview/llfloatersaveprefpreset.cpp @@ -70,7 +70,7 @@ void LLFloaterSavePrefPreset::onOpen(const LLSD& key) setTitle(floater_title); - EDefaultOptions option = DEFAULT_SHOW; + EDefaultOptions option = DEFAULT_TOP; LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option); onPresetNameEdited(); @@ -92,7 +92,7 @@ void LLFloaterSavePrefPreset::onBtnSave() void LLFloaterSavePrefPreset::onPresetsListChange() { - EDefaultOptions option = DEFAULT_SHOW; + EDefaultOptions option = DEFAULT_TOP; LLPresetsManager::getInstance()->setPresetNamesInComboBox(mSubdirectory, mPresetCombo, option); } diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 1cdd1b664e..737ae2e32d 100755 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -65,6 +65,9 @@ extern LLControlGroup gSavedSettings; static const LLUUID PARCEL_MEDIA_LIST_ITEM_UUID = LLUUID("CAB5920F-E484-4233-8621-384CF373A321"); static const LLUUID PARCEL_AUDIO_LIST_ITEM_UUID = LLUUID("DF4B020D-8A24-4B95-AB5D-CA970D694822"); +const F32 AUTO_CLOSE_FADE_TIME_START= 2.0f; +const F32 AUTO_CLOSE_FADE_TIME_END = 3.0f; + // // LLPanelNearByMedia // @@ -227,9 +230,6 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent) } -const F32 AUTO_CLOSE_FADE_TIME_START= 4.0f; -const F32 AUTO_CLOSE_FADE_TIME_END = 5.0f; - /*virtual*/ void LLPanelNearByMedia::draw() { diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp index 4756f3bd75..ceff5a54e8 100644 --- a/indra/newview/llpanelpresetspulldown.cpp +++ b/indra/newview/llpanelpresetspulldown.cpp @@ -39,8 +39,8 @@ #include "llsliderctrl.h" #include "llscrolllistctrl.h" -/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseFadeStartTimeSec = 4.0f; -/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseTotalTimeSec = 5.0f; +/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseFadeStartTimeSec = 2.0f; +/* static */ const F32 LLPanelPresetsPulldown::sAutoCloseTotalTimeSec = 3.0f; ///---------------------------------------------------------------------------- /// Class LLPanelPresetsPulldown @@ -71,7 +71,7 @@ BOOL LLPanelPresetsPulldown::postBuild() void LLPanelPresetsPulldown::populatePanel() { std::string presets_dir = LLPresetsManager::getInstance()->getPresetsDir(PRESETS_GRAPHIC); - LLPresetsManager::getInstance()->loadPresetNamesFromDir(presets_dir, mPresetNames, DEFAULT_SHOW); + LLPresetsManager::getInstance()->loadPresetNamesFromDir(presets_dir, mPresetNames, DEFAULT_TOP); LLScrollListCtrl* scroll = getChild<LLScrollListCtrl>("preset_list"); @@ -91,7 +91,7 @@ void LLPanelPresetsPulldown::populatePanel() { row["columns"][1]["column"] = "icon"; row["columns"][1]["type"] = "icon"; - row["columns"][1]["value"] = "Inv_Landmark"; + row["columns"][1]["value"] = "Check_Mark"; } scroll->addElement(row); @@ -145,11 +145,7 @@ void LLPanelPresetsPulldown::onRowClick(const LLSD& user_data) std::string name = item->getColumn(1)->getValue().asString(); LLPresetsManager::getInstance()->loadPreset(PRESETS_GRAPHIC, name); - LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); - if (instance) - { - instance->refreshEnabledGraphics(); - } + setVisible(FALSE); } } diff --git a/indra/newview/llpanelpresetspulldown.h b/indra/newview/llpanelpresetspulldown.h index f3e0340247..146ccc0b09 100644 --- a/indra/newview/llpanelpresetspulldown.h +++ b/indra/newview/llpanelpresetspulldown.h @@ -43,9 +43,9 @@ class LLPanelPresetsPulldown : public LLPanel /*virtual*/ void onTopLost(); /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); /*virtual*/ BOOL postBuild(); + void populatePanel(); private: - void populatePanel(); void onGraphicsButtonClick(const LLSD& user_data); void onRowClick(const LLSD& user_data); diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp index cb00f742cc..6595da235c 100755 --- a/indra/newview/llpanelvolumepulldown.cpp +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -40,8 +40,8 @@ #include "llfloaterpreference.h" #include "llsliderctrl.h" -/* static */ const F32 LLPanelVolumePulldown::sAutoCloseFadeStartTimeSec = 4.0f; -/* static */ const F32 LLPanelVolumePulldown::sAutoCloseTotalTimeSec = 5.0f; +/* static */ const F32 LLPanelVolumePulldown::sAutoCloseFadeStartTimeSec = 2.0f; +/* static */ const F32 LLPanelVolumePulldown::sAutoCloseTotalTimeSec = 3.0f; ///---------------------------------------------------------------------------- /// Class LLPanelVolumePulldown diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 05a135b19c..205c5e6dfb 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -47,21 +47,25 @@ LLPresetsManager::~LLPresetsManager() { } +void LLPresetsManager::triggerChangeSignal() +{ + mPresetListChangeSignal(); +} + void LLPresetsManager::createMissingDefault() { std::string default_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, PRESETS_DIR, PRESETS_GRAPHIC, "default.xml"); if (!gDirUtilp->fileExists(default_file)) { LL_WARNS() << "No " << default_file << " found -- creating one" << LL_ENDL; + // Write current graphic settings to default.xml - // If this name is to be localized additional code will be needed to delete the old default - // when changing languages. savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT); - } - if (gSavedSettings.getString("PresetGraphicActive").empty()) - { - gSavedSettings.setString("PresetGraphicActive", PRESETS_DEFAULT); + if (gSavedSettings.getString("PresetGraphicActive").empty()) + { + gSavedSettings.setString("PresetGraphicActive", PRESETS_DEFAULT); + } } } @@ -86,7 +90,7 @@ std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory) void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option) { - LL_INFOS("AppInit") << "Loading presets from " << dir << LL_ENDL; + LL_INFOS("AppInit") << "Loading list of preset names from " << dir << LL_ENDL; mPresetNames.clear(); @@ -101,19 +105,10 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam { std::string path = gDirUtilp->add(dir, file); std::string name = gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true); - // Two things are happening here: - // 1 - Always put the active preset at the top of the list - // 2 - Possibly hide the default preset + if (PRESETS_DEFAULT != name) { - if (name != gSavedSettings.getString("PresetGraphicActive")) - { - mPresetNames.push_back(name); - } - else - { - mPresetNames.insert(mPresetNames.begin(), name); - } + mPresetNames.push_back(name); } else { @@ -123,6 +118,10 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam mPresetNames.push_back(LLTrans::getString(PRESETS_DEFAULT)); break; + case DEFAULT_TOP: + mPresetNames.push_front(LLTrans::getString(PRESETS_DEFAULT)); + break; + case DEFAULT_HIDE: default: break; @@ -189,8 +188,10 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, const std::st formatter->format(paramsData, presetsXML, LLSDFormatter::OPTIONS_PRETTY); presetsXML.close(); + gSavedSettings.setString("PresetGraphicActive", name); + // signal interested parties - mPresetListChangeSignal(); + triggerChangeSignal(); return true; } @@ -206,6 +207,8 @@ void LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory, std::list<std::string> preset_names; loadPresetNamesFromDir(presets_dir, preset_names, default_option); + std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive"); + if (preset_names.begin() != preset_names.end()) { for (std::list<std::string>::const_iterator it = preset_names.begin(); it != preset_names.end(); ++it) @@ -227,7 +230,17 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, const std::st if(gSavedSettings.loadFromFile(full_path, false, true) > 0) { - mPresetListChangeSignal(); + if(PRESETS_GRAPHIC == subdirectory) + { + gSavedSettings.setString("PresetGraphicActive", name); + } + + LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences"); + if (instance) + { + instance->refreshEnabledGraphics(); + } + triggerChangeSignal(); } } @@ -245,8 +258,14 @@ bool LLPresetsManager::deletePreset(const std::string& subdirectory, const std:: return false; } + // If you delete the preset that is currently marked as loaded then also indicate that no preset is loaded. + if (gSavedSettings.getString("PresetGraphicActive") == name) + { + gSavedSettings.setString("PresetGraphicActive", ""); + } + // signal interested parties - mPresetListChangeSignal(); + triggerChangeSignal(); return true; } diff --git a/indra/newview/llpresetsmanager.h b/indra/newview/llpresetsmanager.h index bf6a531d48..a47c07dfba 100644 --- a/indra/newview/llpresetsmanager.h +++ b/indra/newview/llpresetsmanager.h @@ -40,6 +40,7 @@ static const std::string PRESETS_CAMERA = "camera"; enum EDefaultOptions { DEFAULT_SHOW, + DEFAULT_TOP, DEFAULT_HIDE // Do not display "Default" in a list }; @@ -51,6 +52,7 @@ public: typedef boost::signals2::signal<void()> preset_list_signal_t; void createMissingDefault(); + void triggerChangeSignal(); static std::string getPresetsDir(const std::string& subdirectory); void setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option); void loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option); @@ -58,9 +60,11 @@ public: void loadPreset(const std::string& subdirectory, const std::string & name); bool deletePreset(const std::string& subdirectory, const std::string& name); - /// Emitted when a preset gets loaded or deleted. + // Emitted when a preset gets loaded, deleted, or saved. boost::signals2::connection setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb); + // Emitted when a preset gets loaded or saved. + preset_name_list_t mPresetNames; LLPresetsManager(); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 8acb56d650..5ab7551849 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -79,6 +79,7 @@ #include "llfloaterlagmeter.h" #include "llfloaterland.h" #include "llfloaterlandholdings.h" +#include "llfloaterloadprefpreset.h" #include "llfloatermap.h" #include "llfloatermediasettings.h" #include "llfloatermemleak.h" @@ -242,6 +243,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLagMeter>); LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLandHoldings>); + LLFloaterReg::add("load_pref_preset", "floater_load_pref_preset.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLoadPrefPreset>); LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMemLeak>); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7e9f098172..efa5724389 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -980,10 +980,11 @@ void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts) iter != LLCharacter::sInstances.end(); ++iter) { LLVOAvatar* inst = (LLVOAvatar*) *iter; - if (!inst) - continue; - S32 rez_status = inst->getRezzedStatus(); - counts[rez_status]++; + if (inst) + { + S32 rez_status = inst->getRezzedStatus(); + counts[rez_status]++; + } } } @@ -1973,9 +1974,6 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, } } - //LL_INFOS() << getRotation() << LL_ENDL; - //LL_INFOS() << getPosition() << LL_ENDL; - return retval; } @@ -1991,7 +1989,7 @@ LLViewerFetchedTexture *LLVOAvatar::getBakedTextureImage(const U8 te, const LLUU result = gTextureList.findImage(uuid); } if (!result) -{ + { const std::string url = getImageURL(te,uuid); if (url.empty()) @@ -3087,17 +3085,16 @@ bool LLVOAvatar::isVisuallyMuted() { bool muted = false; + // Priority order (highest priority first) + // * own avatar is never visually muted + // * if on the "always draw normally" list, draw them normally + // * if on the "always visually mute" list, mute them + // * draw them normally if they meet the following criteria: + // - within the closest N avatars + // - AND aren't over the thresholds + // * otherwise visually mute all other avatars if (!isSelf()) { - // Priority order (highest priority first) - // * own avatar is never visually muted - // * if on the "always draw normally" list, draw them normally - // * if on the "always visually mute" list, mute them - // * draw them normally if they meet the following criteria: - // - within the closest N avatars OR on friends list OR in an IM chat - // - AND aren't over the thresholds - // * otherwise visually mute all other avatars - static LLCachedControl<U32> max_attachment_bytes(gSavedSettings, "RenderAutoMuteByteLimit", 0); static LLCachedControl<F32> max_attachment_area(gSavedSettings, "RenderAutoMuteSurfaceAreaLimit", 0.0); static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAutoMuteRenderWeightLimit", 0); @@ -3121,30 +3118,12 @@ bool LLVOAvatar::isVisuallyMuted() else { // Determine if visually muted or not - muted = LLMuteList::getInstance()->isMuted(getID()) || - (mAttachmentGeometryBytes > max_attachment_bytes && max_attachment_bytes > 0) || - (mAttachmentSurfaceArea > max_attachment_area && max_attachment_area > 0.f) || - (mVisualComplexity > max_render_cost && max_render_cost > 0); - - // Could be part of the grand || collection above, but yanked out to make the logic visible - if (!muted) - { - if (sMaxVisible > 0) - { // They are above the visibilty rank - mute them - muted = (mVisibilityRank > sMaxVisible); - } - - // Always draw friends or those in IMs. Needs UI? - if (muted || sMaxVisible == 0) // Don't mute friends or IMs - { - muted = !(LLAvatarTracker::instance().isBuddy(getID())); - if (muted) - { // Not a friend, so they are muted ... are they in an IM? - LLUUID session_id = gIMMgr->computeSessionID(IM_NOTHING_SPECIAL,getID()); - muted = !gIMMgr->hasSession(session_id); - } - } - } + muted = ( (sMaxVisible > 0 && mVisibilityRank > sMaxVisible) + || (max_render_cost > 0 && mVisualComplexity > max_render_cost) + || (max_attachment_bytes > 0 && mAttachmentGeometryBytes > max_attachment_bytes) + || (max_attachment_area > 0.f && mAttachmentSurfaceArea > max_attachment_area) + || LLMuteList::getInstance()->isMuted(getID()) + ); // Save visual mute state and set interval for updating const F64 SECONDS_BETWEEN_RENDER_AUTO_MUTE_UPDATES = 1.5; @@ -3328,7 +3307,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) removeAnimationData("Walk Speed"); } mMotionController.setTimeStep(time_step); -// LL_INFOS() << "Setting timestep to " << time_quantum * pixel_area_scale << LL_ENDL; + // LL_INFOS() << "Setting timestep to " << time_quantum * pixel_area_scale << LL_ENDL; } if (getParent() && !mIsSitting) @@ -3469,7 +3448,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) fwdDir.normalize(); } } - } LLQuaternion root_rotation = mRoot->getWorldMatrix().quaternion(); @@ -3585,10 +3563,14 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // update animations if (mSpecialRenderMode == 1) // Animation Preview + { updateMotions(LLCharacter::FORCE_UPDATE); + } else + { updateMotions(LLCharacter::NORMAL_UPDATE); - + } + // update head position updateHeadOffset(); @@ -3685,10 +3667,6 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) //mesh vertices need to be reskinned mNeedsSkin = TRUE; - - - - return TRUE; } //----------------------------------------------------------------------------- @@ -7992,10 +7970,6 @@ void LLVOAvatar::idleUpdateRenderCost() } mText->addLine(info_line, info_color, info_style); - // TEMPORARY Reported Cost - info_line = llformat("%d reported ARC", mReportedVisualComplexity); - mText->addLine(info_line, info_color /* same as real ARC */, LLFontGL::ITALIC); - // Visual rank info_line = llformat("%d rank", mVisibilityRank); @@ -8143,9 +8117,8 @@ void LLVOAvatar::calculateUpdateRenderCost() for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it) { LLUUID image_id = it->first; - if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR) - continue; - if (all_textures.find(image_id) == all_textures.end()) + if( ! (image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR) + && (all_textures.find(image_id) == all_textures.end())) { // attachment texture not previously seen. LL_INFOS() << "attachment_texture: " << image_id.asString() << LL_ENDL; @@ -8211,15 +8184,17 @@ LLColor4 LLVOAvatar::calcMutedAVColor(F32 value, S32 range_low, S32 range_high) // static BOOL LLVOAvatar::isIndexLocalTexture(ETextureIndex index) { - if (index < 0 || index >= TEX_NUM_INDICES) return false; - return LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mIsLocalTexture; + return (index < 0 || index >= TEX_NUM_INDICES) + ? false + : LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mIsLocalTexture; } // static BOOL LLVOAvatar::isIndexBakedTexture(ETextureIndex index) { - if (index < 0 || index >= TEX_NUM_INDICES) return false; - return LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mIsBakedTexture; + return (index < 0 || index >= TEX_NUM_INDICES) + ? false + : LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mIsBakedTexture; } const std::string LLVOAvatar::getBakedStatusForPrintout() const diff --git a/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml b/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml new file mode 100644 index 0000000000..72feeeef74 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_load_pref_preset.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<floater + legacy_header_height="18" + height="130" + help_topic="floater_load_pref" + layout="topleft" + name="Load Pref Preset" + save_rect="true" + title="LOAD PREF PRESET" + width="550"> + + <string name="title_graphic">Load Graphic Preset</string> + <string name="title_camera">Load Camera Preset</string> + + <text + follows="top|left|right" + font="SansSerif" + height="10" + layout="topleft" + left="50" + name="Preset" + top="60" + width="60"> + Preset: + </text> + <combo_box + follows="top|left" + layout="topleft" + left_pad="10" + name="preset_combo" + top_delta="-5" + width="200"/> + <button + follows="bottom|right" + height="23" + label="OK" + layout="topleft" + left_pad="15" + name="ok" + width="70"/> + <button + follows="bottom|right" + height="23" + label="Cancel" + layout="topleft" + left_pad="5" + name="cancel" + width="70"/> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index edc205927c..638a4e2da8 100755 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -11,14 +11,6 @@ single_instance="true" title="PREFERENCES" width="658"> - <string name="Reflections0">Minimal</string> - <string name="Reflections1">Terrain and trees</string> - <string name="Reflections2">All static objects</string> - <string name="Reflections3">All avatars and objects</string> - <string name="Reflections4">Everything</string> - <string name="RenderShadowDetail0">None</string> - <string name="RenderShadowDetail1">Sun/Moon</string> - <string name="RenderShadowDetail2">Sun/Moon + Projectors</string> <button follows="right|bottom" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index a53097a117..ae44d03cb3 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -17,40 +17,41 @@ height="16" layout="topleft" left="5" - name="presets_text" top="10" - width="60"> - Presets: + width="100"> + Preset in use: + </text> + + <text + follows="top|left|right" + font="SansSerif" + height="16" + layout="topleft" + left_delta="110" + name="preset_text" + top="10" + width="120"> + (None) </text> - <combo_box - follows="top|left" - layout="topleft" - left_pad="0" - max_chars="100" - name="graphic_preset_combo" - top_delta="0" - width="150"> - <combo_box.commit_callback - function="Pref.Preset" - parameter="graphic" /> - </combo_box> + <button follows="top|left" height="23" - label="Save As..." + label="Load preset..." layout="topleft" left_pad="5" - name="PrefSaveButton" + name="PrefLoadButton" top_delta="0" width="115"> <button.commit_callback - function="Pref.PrefSave" + function="Pref.PrefLoad" parameter="graphic"/> </button> + <button follows="top|left" height="23" - label="Delete..." + label="Delete preset..." layout="topleft" left_pad="5" name="PrefDeleteButton" @@ -60,17 +61,70 @@ function="Pref.PrefDelete" parameter="graphic"/> </button> + <text type="string" length="1" follows="left|top" height="12" layout="topleft" - left="30" + left="10" name="QualitySpeed" top_delta="30" width="400"> - Quality and speed: + Quality & speed: + </text> + <text + type="string" + length="1" + follows="left|top" + halign="center" + height="12" + layout="topleft" + left="118" + name="ShadersPrefText" + top_delta="0" + width="80"> + Low + </text> + <text + type="string" + length="1" + follows="left|top" + halign="center" + height="12" + layout="topleft" + left_delta="87" + name="ShadersPrefText2" + top_delta="0" + width="80"> + Mid + </text> + <text + type="string" + length="1" + follows="left|top" + halign="center" + height="12" + layout="topleft" + left_delta="87" + name="ShadersPrefText3" + top_delta="0" + width="80"> + High + </text> + <text + type="string" + length="1" + follows="left|top" + halign="center" + height="12" + layout="topleft" + left_delta="85" + name="ShadersPrefText4" + top_delta="0" + width="80"> + Ultra </text> <text type="string" @@ -79,7 +133,7 @@ halign="right" height="12" layout="topleft" - left="35" + left="65" name="FasterText" top_pad="4" width="80"> @@ -102,7 +156,7 @@ height="14" image_name="Rounded_Square" layout="topleft" - left="128" + left="158" name="LowGraphicsDivet" top_delta="-2" width="2" /> @@ -167,7 +221,7 @@ increment="1" initial_value="0" layout="topleft" - left="120" + left="150" max_val="6" name="QualityPerformanceSelection" show_text="false" @@ -181,7 +235,8 @@ <tab_container follows="left|top" - height="400" + layout="topleft" + height="390" halign="center" left="0" name="PreferencesGraphicsTabs" @@ -189,10 +244,9 @@ tab_min_width="40" tab_position="top" tab_height="25" - top_delta="25" + top="80" width="517"> - <!-- This block shows Basic Settings --> <panel border="false" @@ -201,9 +255,22 @@ layout="topleft" mouse_opaque="false" name="Basic" - top="30" + top="10" width="517"> + <button + follows="top|left" + height="23" + label="Reset all to recommended settings" + layout="topleft" + left="5" + name="Defaults" + top_delta="5" + width="250"> + <button.commit_callback + function="Pref.HardwareDefaults" /> + </button> + <slider control_name="RenderFarClip" decimal_digits="0" @@ -218,7 +285,7 @@ min_val="64" max_val="512" name="DrawDistance" - top_delta="0" + top_delta="40" width="330" /> <text type="string" @@ -233,36 +300,19 @@ m </text> - <slider - control_name="RenderAvatarLODFactor" - follows="left|top" + <check_box + control_name="WindLightUseAtmosShaders" height="16" - increment="0.125" - initial_value="160" - label="Avatar detail:" - label_width="90" + initial_value="true" + label="Atmospheric shaders" layout="topleft" left="30" - name="AvatarMeshDetail2" - show_text="false" - top_delta="30" - width="300"> - <slider.commit_callback - function="Pref.UpdateSliderText" - parameter="AvatarMeshDetailText2" /> - </slider> - <text - type="string" - length="1" - follows="left|top" - height="12" - layout="topleft" - name="AvatarMeshDetailText2" - top_delta="0" - left_delta="304" - width="128"> - Low - </text> + name="WindLightUseAtmosShaders" + top_delta="20" + width="280"> + <check_box.commit_callback + function="Pref.VertexShaderEnable" /> + </check_box> <check_box control_name="RenderDeferred" @@ -270,13 +320,14 @@ initial_value="true" label="Advanced Lighting Model" layout="topleft" - left="30" - name="UseLightShaders2" + left="50" + name="UseLightShaders" top_delta="20" width="256"> <check_box.commit_callback function="Pref.VertexShaderEnable" /> </check_box> + </panel> <!-- End of Basic Settings block --> @@ -288,12 +339,12 @@ layout="topleft" mouse_opaque="false" name="Advanced" - top_delta="20" + top_delta="10" width="517"> <scroll_container follows="top|left" - height="270" + height="260" label="CustomGraphics" layout="topleft" left="5" @@ -313,17 +364,30 @@ top_delta="0" width="485"> + <button + follows="top|left" + height="23" + label="Reset all to recommended settings" + layout="topleft" + left="0" + name="Defaults" + top="0" + width="250"> + <button.commit_callback + function="Pref.HardwareDefaults" /> + </button> + <text type="string" length="1" follows="left|top" height="16" layout="topleft" - name="OtherText" - top="0" + name="GeneralText" + top_delta="25" left="5" width="128"> - Other + General </text> <slider @@ -405,40 +469,6 @@ Low </text> - <slider - control_name="RenderTerrainDetail" - follows="left|top" - height="16" - label="Terrain Detail:" - label_width="185" - layout="topleft" - left="30" - show_text="false" - initial_value="0" - increment="1" - min_val="0" - max_val="1" - name="TerrainDetail" - top_delta="16" - width="300" > - <slider.commit_callback - function="Pref.UpdateSliderText" - parameter="TerrainDetail" /> - </slider> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - top_delta="0" - left_delta="304" - name="TerrainDetailText" - text_readonly_color="LabelDisabledColor" - width="128"> - Low - </text> - <text type="string" length="1" @@ -452,54 +482,39 @@ Avatar </text> - <slider - control_name="RenderAvatarLODFactor" - follows="left|top" + <check_box + control_name="RenderUseImpostors" height="16" - increment="0.125" - initial_value="160" - label="Detail:" - label_width="185" + initial_value="true" + label="Impostors" layout="topleft" left="30" - name="AvatarMeshDetail" - show_text="false" - top_delta="16" + name="AvatarImpostors" + top_delta="20" width="300"> - <slider.commit_callback - function="Pref.UpdateSliderText" - parameter="AvatarMeshDetailText" /> - </slider> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - name="AvatarMeshDetailText" - top_delta="0" - left_delta="304" - width="128"> - Low - </text> + <check_box.commit_callback + function="Pref.AvatarImpostorsEnable" /> + </check_box> <slider - control_name="RenderAvatarPhysicsLODFactor" + control_name="MaximumARC" follows="left|top" height="16" - initial_value="100" - increment=".05" - label="Physics:" - label_width="185" + initial_value="101" + increment="1" + label="Maximum ARC:" + label_width="165" layout="topleft" - left="30" - name="AvatarPhysicsDetail" + left="50" + min_val="1" + max_val="101" + name="MaximumARC" show_text="false" top_delta="16" - width="300"> + width="280"> <slider.commit_callback function="Pref.UpdateSliderText" - parameter="AvatarPhysicsDetailText" /> + parameter="MaximumARCText" /> </slider> <text type="string" @@ -508,10 +523,11 @@ height="16" layout="topleft" top_delta="0" - left_delta="304" - name="AvatarPhysicsDetailText" + left_delta="284" + text_readonly_color="LabelDisabledColor" + name="MaximumARCText" width="128"> - Low + 0 </text> <slider @@ -521,124 +537,33 @@ height="16" increment="1" initial_value="12" - label="Max. # of non-impostor avatars:" - label_width="185" + label="Max. # of non-impostors:" + label_width="165" layout="topleft" - left="30" + left="50" min_val="1" max_val="65" name="MaxNumberAvatarDrawn" top_delta="16" - width="325" /> + width="305" /> <slider - control_name="MaximumARC" - follows="left|top" - height="16" - initial_value="0" - increment="1" - label="Maximum ARC:" - label_width="185" - layout="topleft" - left="30" - min_val="0" - max_val="100" - name="MaximumARC" - show_text="false" - top_delta="16" - width="300"> - <slider.commit_callback - function="Pref.UpdateSliderText" - parameter="MaximumARCText" /> - </slider> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - top_delta="0" - left_delta="304" - name="MaximumARCText" - width="128"> - Low - </text> - - <check_box - control_name="RenderUseImpostors" - height="16" - initial_value="true" - label="Avatar impostors" - layout="topleft" - left="30" - name="AvatarImpostors" - top_delta="20" - width="300" /> - - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - name="AvatarText" - top_delta="20" - left="5" - width="128"> - Mesh - </text> - - <slider - control_name="RenderTerrainLODFactor" - follows="left|top" - height="16" - increment="0.125" - initial_value="160" - label="Terrain Mesh Detail:" - label_width="185" - layout="topleft" - left="30" - min_val="1" - max_val="2" - name="TerrainMeshDetail" - show_text="false" - top_delta="16" - width="300"> - <slider.commit_callback - function="Pref.UpdateSliderText" - parameter="TerrainMeshDetailText" /> - </slider> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - name="TerrainMeshDetailText" - text_readonly_color="LabelDisabledColor" - top_delta="0" - left_delta="304" - width="128"> - Low - </text> - - <slider - control_name="RenderTreeLODFactor" + control_name="RenderAvatarLODFactor" follows="left|top" height="16" increment="0.125" initial_value="160" - label="Trees:" + label="Detail:" label_width="185" layout="topleft" left="30" - name="TreeMeshDetail" + name="AvatarMeshDetail" show_text="false" top_delta="16" width="300"> <slider.commit_callback function="Pref.UpdateSliderText" - parameter="TreeMeshDetailText" /> + parameter="AvatarMeshDetailText" /> </slider> <text type="string" @@ -646,61 +571,30 @@ follows="left|top" height="16" layout="topleft" - name="TreeMeshDetailText" + name="AvatarMeshDetailText" top_delta="0" left_delta="304" width="128"> - Low + Low </text> <slider - control_name="RenderVolumeLODFactor" + control_name="RenderAvatarPhysicsLODFactor" follows="left|top" height="16" - increment="0.125" - initial_value="160" - label="Objects:" + initial_value="100" + increment=".05" + label="Physics:" label_width="185" layout="topleft" left="30" - max_val="2" - name="ObjectMeshDetail" + name="AvatarPhysicsDetail" show_text="false" top_delta="16" width="300"> <slider.commit_callback function="Pref.UpdateSliderText" - parameter="ObjectMeshDetailText" /> - </slider> - <text - type="string" - length="1" - follows="left|top" - height="16" - layout="topleft" - name="ObjectMeshDetailText" - top_delta="0" - left_delta="304" - width="128"> - Low - </text> - - <slider - control_name="RenderFlexTimeFactor" - follows="left|top" - height="16" - initial_value="160" - label="Flexiprims:" - label_width="185" - layout="topleft" - left="30" - name="FlexibleMeshDetail" - show_text="false" - top_delta="16" - width="300"> - <slider.commit_callback - function="Pref.UpdateSliderText" - parameter="FlexibleMeshDetailText" /> + parameter="AvatarPhysicsDetailText" /> </slider> <text type="string" @@ -708,9 +602,9 @@ follows="left|top" height="16" layout="topleft" - name="FlexibleMeshDetailText" top_delta="0" left_delta="304" + name="AvatarPhysicsDetailText" width="128"> Low </text> @@ -779,6 +673,40 @@ function="Pref.VertexShaderEnable" /> </check_box> + <slider + control_name="RenderTerrainDetail" + follows="left|top" + height="16" + label="Terrain Detail:" + label_width="165" + layout="topleft" + left="50" + show_text="false" + initial_value="0" + increment="1" + min_val="0" + max_val="1" + name="TerrainDetail" + top_delta="16" + width="280" > + <slider.commit_callback + function="Pref.UpdateSliderText" + parameter="TerrainDetail" /> + </slider> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + top_delta="0" + left_delta="284" + name="TerrainDetailText" + text_readonly_color="LabelDisabledColor" + width="128"> + Low + </text> + <check_box control_name="RenderAvatarVP" height="16" @@ -804,26 +732,6 @@ top_delta="16" width="280" /> - <slider - control_name="RenderReflectionDetail" - follows="left|top" - height="16" - increment="1" - initial_value="2" - label="Water Reflections:" - label_width="165" - layout="topleft" - left="50" - min_val="0" - max_val="4" - name="Reflections" - show_text="false" - top_delta="16" - width="280"> - <slider.commit_callback - function="Pref.UpdateSliderText" - parameter="ReflectionsText" /> - </slider> <text type="string" length="1" @@ -832,11 +740,40 @@ layout="topleft" name="ReflectionsText" text_readonly_color="LabelDisabledColor" - top_delta="0" - left_delta="284" + top_delta="16" + left="50" width="128"> - Minimal + Water Reflections: </text> + <combo_box + control_name="RenderReflectionDetail" + height="18" + layout="topleft" + left_delta="170" + top_delta="0" + name="Reflections" + width="150"> + <combo_box.item + label="Minimal" + name="0" + value="0"/> + <combo_box.item + label="Terrain and trees" + name="1" + value="1"/> + <combo_box.item + label="All static objects" + name="2" + value="2"/> + <combo_box.item + label="All avatars and objects" + name="3" + value="3"/> + <combo_box.item + label="Everything" + name="4" + value="4"/> + </combo_box> <check_box control_name="WindLightUseAtmosShaders" @@ -845,7 +782,7 @@ label="Atmospheric shaders" layout="topleft" left="50" - name="WindLightUseAtmosShaders" + name="WindLightUseAtmosShaders2" top_delta="16" width="280"> <check_box.commit_callback @@ -894,7 +831,7 @@ label="Advanced Lighting Model" layout="topleft" left="70" - name="UseLightShaders" + name="UseLightShaders2" top_delta="16" width="260"> <check_box.commit_callback @@ -929,25 +866,73 @@ function="Pref.VertexShaderEnable" /> </check_box> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="90" + name="RenderShadowDetailText" + text_readonly_color="LabelDisabledColor" + top_delta="16" + width="128"> + Shadows: + </text> + <combo_box + control_name="RenderShadowDetail" + height="18" + layout="topleft" + left_delta="130" + top_delta="0" + name="ShadowDetail" + width="150"> + <combo_box.item + label="None" + name="0" + value="0"/> + <combo_box.item + label="Sun/Moon" + name="1" + value="1"/> + <combo_box.item + label="Sun/Moon + Projectors" + name="2" + value="2"/> + </combo_box> + + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + name="AvatarText" + top_delta="20" + left="5" + width="128"> + Mesh + </text> + <slider - control_name="RenderShadowDetail" + control_name="RenderTerrainLODFactor" follows="left|top" height="16" - increment="1" - initial_value="2" - label="Shadows:" - label_width="145" + increment="0.125" + initial_value="160" + label="Terrain Mesh Detail:" + label_width="185" layout="topleft" - left="70" - min_val="0" + left="30" + min_val="1" max_val="2" - name="ShadowDetail" + name="TerrainMeshDetail" show_text="false" top_delta="16" - width="260"> + width="300"> <slider.commit_callback function="Pref.UpdateSliderText" - parameter="RenderShadowDetailText" /> + parameter="TerrainMeshDetailText" /> </slider> <text type="string" @@ -955,12 +940,105 @@ follows="left|top" height="16" layout="topleft" - left_delta="264" - name="RenderShadowDetailText" + name="TerrainMeshDetailText" text_readonly_color="LabelDisabledColor" top_delta="0" + left_delta="304" width="128"> - None + Low + </text> + + <slider + control_name="RenderTreeLODFactor" + follows="left|top" + height="16" + increment="0.125" + initial_value="160" + label="Trees:" + label_width="185" + layout="topleft" + left="30" + name="TreeMeshDetail" + show_text="false" + top_delta="16" + width="300"> + <slider.commit_callback + function="Pref.UpdateSliderText" + parameter="TreeMeshDetailText" /> + </slider> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + name="TreeMeshDetailText" + top_delta="0" + left_delta="304" + width="128"> + Low + </text> + + <slider + control_name="RenderVolumeLODFactor" + follows="left|top" + height="16" + increment="0.125" + initial_value="160" + label="Objects:" + label_width="185" + layout="topleft" + left="30" + max_val="2" + name="ObjectMeshDetail" + show_text="false" + top_delta="16" + width="300"> + <slider.commit_callback + function="Pref.UpdateSliderText" + parameter="ObjectMeshDetailText" /> + </slider> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + name="ObjectMeshDetailText" + top_delta="0" + left_delta="304" + width="128"> + Low + </text> + + <slider + control_name="RenderFlexTimeFactor" + follows="left|top" + height="16" + initial_value="160" + label="Flexiprims:" + label_width="185" + layout="topleft" + left="30" + name="FlexibleMeshDetail" + show_text="false" + top_delta="16" + width="300"> + <slider.commit_callback + function="Pref.UpdateSliderText" + parameter="FlexibleMeshDetailText" /> + </slider> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + name="FlexibleMeshDetailText" + top_delta="0" + left_delta="304" + width="128"> + Low </text> <text @@ -976,7 +1054,6 @@ Hardware </text> - <slider control_name="TextureMemory" decimal_digits="0" @@ -1137,14 +1214,15 @@ <button follows="left|bottom" height="23" - label="Recommended Settings" + label="Save settings as a preset..." layout="topleft" left="10" - name="Defaults" - top="310" - width="200"> + name="PrefSaveButton" + top="300" + width="250"> <button.commit_callback - function="Pref.HardwareDefaults" /> + function="Pref.PrefSave" + parameter="graphic" /> </button> </tab_container> </panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 023c6e5bbb..c09129c867 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4046,4 +4046,5 @@ Try enclosing path to the editor with double quotes. <string name="preset_combo_label">-Empty list-</string> <string name="Default">Default</string> <string name="Off">Off</string> + <string name="none_paren_cap">(None)</string> </strings> |