diff options
author | seth_productengine <none@none> | 2011-07-28 18:41:43 +0300 |
---|---|---|
committer | seth_productengine <none@none> | 2011-07-28 18:41:43 +0300 |
commit | 6c7653c65bd3f9907bcd4a8a54e4e5c1d172d15e (patch) | |
tree | f7f76b9b50e61e255859eca9c7e205c0a5e83f96 | |
parent | ea3d58b3141a7277870b66262ee0afb9c23c3423 (diff) |
SH-2169 FIXED New object weights floater added.
-rw-r--r-- | indra/newview/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterobjectweights.cpp | 99 | ||||
-rw-r--r-- | indra/newview/llfloaterobjectweights.h | 64 | ||||
-rw-r--r-- | indra/newview/llfloatertools.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_object_weights.xml | 310 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 2 |
7 files changed, 482 insertions, 2 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6292ee97c8..f2a9ccacec 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -213,6 +213,7 @@ set(viewer_SOURCE_FILES llfloatermodelwizard.cpp llfloaternamedesc.cpp llfloaternotificationsconsole.cpp + llfloaterobjectweights.cpp llfloateropenobject.cpp llfloaterpay.cpp llfloaterperms.cpp @@ -775,6 +776,7 @@ set(viewer_HEADER_FILES llfloatermodelwizard.h llfloaternamedesc.h llfloaternotificationsconsole.h + llfloaterobjectweights.h llfloateropenobject.h llfloaterpay.h llfloaterperms.h diff --git a/indra/newview/llfloaterobjectweights.cpp b/indra/newview/llfloaterobjectweights.cpp new file mode 100644 index 0000000000..93aa8dcf08 --- /dev/null +++ b/indra/newview/llfloaterobjectweights.cpp @@ -0,0 +1,99 @@ +/** + * @file llfloaterobjectweights.cpp + * @brief Object weights advanced view floater + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ +#include "llviewerprecompiledheaders.h" + +#include "llfloaterobjectweights.h" + +#include "lltextbox.h" + +LLFloaterObjectWeights::LLFloaterObjectWeights(const LLSD& key) +: LLFloater(key), + mSelectedObjects(NULL), + mSelectedPrims(NULL), + mSelectedDownloadWeight(NULL), + mSelectedPhysicsWeight(NULL), + mSelectedServerWeight(NULL), + mSelectedDisplayWeight(NULL), + mSelectedOnLand(NULL), + mRezzedOnLand(NULL), + mRemainingCapacity(NULL), + mTotalCapacity(NULL) +{ +} + +LLFloaterObjectWeights::~LLFloaterObjectWeights() +{ +} + +// virtual +BOOL LLFloaterObjectWeights::postBuild() +{ + mSelectedObjects = getChild<LLTextBox>("objects"); + mSelectedPrims = getChild<LLTextBox>("prims"); + + mSelectedDownloadWeight = getChild<LLTextBox>("download"); + mSelectedPhysicsWeight = getChild<LLTextBox>("physics"); + mSelectedServerWeight = getChild<LLTextBox>("server"); + mSelectedDisplayWeight = getChild<LLTextBox>("display"); + + mSelectedOnLand = getChild<LLTextBox>("used_download_weight"); + mRezzedOnLand = getChild<LLTextBox>("used_download_weight"); + mRemainingCapacity = getChild<LLTextBox>("used_download_weight"); + mTotalCapacity = getChild<LLTextBox>("used_download_weight"); + + return TRUE; +} + +// virtual +void LLFloaterObjectWeights::onOpen(const LLSD& key) +{ + updateIfNothingSelected(); +} + +void LLFloaterObjectWeights::toggleLoadingIndicators(bool visible) +{ + childSetVisible("download_loading_indicator", visible); + childSetVisible("physics_loading_indicator", visible); + childSetVisible("server_loading_indicator", visible); + childSetVisible("display_loading_indicator", visible); +} + +void LLFloaterObjectWeights::updateIfNothingSelected() +{ + const std::string text = getString("nothing_selected"); + + mSelectedObjects->setText(text); + mSelectedPrims->setText(text); + + mSelectedDownloadWeight->setText(text); + mSelectedPhysicsWeight->setText(text); + mSelectedServerWeight->setText(text); + mSelectedDisplayWeight->setText(text); + + mSelectedOnLand->setText(text); + + toggleLoadingIndicators(false); +} diff --git a/indra/newview/llfloaterobjectweights.h b/indra/newview/llfloaterobjectweights.h new file mode 100644 index 0000000000..10e35ad7a7 --- /dev/null +++ b/indra/newview/llfloaterobjectweights.h @@ -0,0 +1,64 @@ +/** + * @file llfloaterobjectweights.h + * @brief Object weights advanced view floater + * + * $LicenseInfo:firstyear=2011&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATEROBJECTWEIGHTS_H +#define LL_LLFLOATEROBJECTWEIGHTS_H + +#include "llfloater.h" + +class LLTextBox; + +class LLFloaterObjectWeights : public LLFloater +{ +public: + LOG_CLASS(LLFloaterObjectWeights); + + LLFloaterObjectWeights(const LLSD& key); + ~LLFloaterObjectWeights(); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void onOpen(const LLSD& key); + +private: + void toggleLoadingIndicators(bool visible); + void updateIfNothingSelected(); + + LLTextBox *mSelectedObjects; + LLTextBox *mSelectedPrims; + + LLTextBox *mSelectedDownloadWeight; + LLTextBox *mSelectedPhysicsWeight; + LLTextBox *mSelectedServerWeight; + LLTextBox *mSelectedDisplayWeight; + + LLTextBox *mSelectedOnLand; + LLTextBox *mRezzedOnLand; + LLTextBox *mRemainingCapacity; + LLTextBox *mTotalCapacity; +}; + +#endif //LL_LLFLOATEROBJECTWEIGHTS_H diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 84fb8bd9e7..9121e80a4e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -826,6 +826,9 @@ void LLFloaterTools::onClose(bool app_quitting) //gMenuBarView->setItemVisible("BuildTools", FALSE); LLFloaterReg::hideInstance("media_settings"); + + // hide the advanced object weights floater + LLFloaterReg::hideInstance("object_weights"); } void click_popup_info(void*) diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 26f05337a4..b0a547cbf1 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -79,6 +79,7 @@ #include "llfloatermodelwizard.h" #include "llfloaternamedesc.h" #include "llfloaternotificationsconsole.h" +#include "llfloaterobjectweights.h" #include "llfloateropenobject.h" #include "llfloaterpay.h" #include "llfloaterperms.h" @@ -226,6 +227,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>); LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>); + LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterObjectWeights>); LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>); LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>); LLFloaterPayUtil::registerFloater(); @@ -286,7 +288,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>); LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>); - LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>); + LLFloaterReg::add("web_content", "floater_web_content.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWebContent>); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>); LLFloaterWindowSizeUtil::registerFloater(); LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>); diff --git a/indra/newview/skins/default/xui/en/floater_object_weights.xml b/indra/newview/skins/default/xui/en/floater_object_weights.xml new file mode 100644 index 0000000000..f377386679 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_object_weights.xml @@ -0,0 +1,310 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<floater + can_close="true" + can_tear_off="false" + height="315" + help_topic="objects_weight_floater" + layout="topleft" + name="object_weights" + save_rect="true" + single_instance="true" + title="ADVANCED" + width="200"> + <floater.string + name="nothing_selected" + value="--"/> + + <text + follows="left|top" + height="16" + layout="topleft" + left="10" + name="selected_text" + text_color="EmphasisColor" + top="10" + value="SELECTED" + width="180" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="objects" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="objects_label" + top_delta="0" + value="Objects" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="prims" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="prims_label" + top_delta="0" + value="Prims" + width="130" /> + <view_border + bevel_style="none" + follows="top|left" + height="0" + layout="topleft" + left="10" + name="selected_text_border" + top_pad="5" + width="180"/> + + + <text + follows="left|top" + height="16" + layout="topleft" + left="10" + name="weights_of_selected_text" + text_color="EmphasisColor" + top_pad="10" + value="WEIGHTS OF SELECTED" + width="180" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="download" + top_pad="3" + value="--" + width="40" /> + <loading_indicator + follows="left|top" + height="16" + layout="topleft" + left="34" + name="download_loading_indicator" + top_delta="0" + width="16" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="download_label" + top_delta="0" + value="Download" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="physics" + top_pad="3" + value="--" + width="40" /> + <loading_indicator + follows="left|top" + height="16" + layout="topleft" + left="34" + name="physics_loading_indicator" + top_delta="0" + width="16" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="physics_label" + top_delta="0" + value="Physics" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="server" + top_pad="3" + value="--" + width="40" /> + <loading_indicator + follows="left|top" + height="16" + layout="topleft" + left="34" + name="server_loading_indicator" + top_delta="0" + width="16" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="server_label" + top_delta="0" + value="Server" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="display" + top_pad="3" + value="--" + width="40" /> + <loading_indicator + follows="left|top" + height="16" + layout="topleft" + left="34" + name="display_loading_indicator" + top_delta="0" + width="16" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="display_label" + top_delta="0" + value="Display" + width="130" /> + <view_border + bevel_style="none" + follows="top|left" + height="0" + layout="topleft" + left="10" + name="weights_text_border" + top_pad="5" + width="180"/> + + + <text + follows="left|top" + height="16" + layout="topleft" + left="10" + name="land_impacts_text" + text_color="EmphasisColor" + top_pad="10" + value="LAND IMPACTS" + width="180" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="selected" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="selected_label" + top_delta="0" + value="Selected" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="rezzed_on_land" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="rezzed_on_land_label" + top_delta="0" + value="Rezzed on land" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="remaining_capacity" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="remaining_capacity" + top_delta="0" + value="Remaining capacity" + width="130" /> + <text + follows="left|top" + halign="right" + height="16" + layout="topleft" + left="10" + name="total_capacity" + top_pad="3" + value="--" + width="40" /> + <text + follows="left|top" + height="16" + layout="topleft" + left_pad="10" + name="total_capacity" + top_delta="0" + value="Total capacity" + width="130" /> + <view_border + bevel_style="none" + follows="top|left" + height="0" + layout="topleft" + left="10" + name="land_impacts_text_border" + top_pad="5" + width="180"/> + + <text + follows="left|top" + height="16" + layout="topleft" + left="10" + name="total_capacity" + top_pad="10" + value="[secondlife:///www.secondlife.com What is all this?...]" + width="180" /> +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 8901583799..e794a7067d 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -742,7 +742,7 @@ top_pad="0" visible="false" width="280"> - Physics weight [PHYS_WEIGHT], Render Cost [DISP_WEIGHT]. + Physics weight [PHYS_WEIGHT], Render Cost [DISP_WEIGHT]. [secondlife:///app/openfloater/object_weights More info] </text> <!-- <text --> <!-- text_color="LtGray_50" --> |