From 6c7653c65bd3f9907bcd4a8a54e4e5c1d172d15e Mon Sep 17 00:00:00 2001 From: seth_productengine Date: Thu, 28 Jul 2011 18:41:43 +0300 Subject: SH-2169 FIXED New object weights floater added. --- indra/newview/llfloaterobjectweights.cpp | 99 ++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 indra/newview/llfloaterobjectweights.cpp (limited to 'indra/newview/llfloaterobjectweights.cpp') 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("objects"); + mSelectedPrims = getChild("prims"); + + mSelectedDownloadWeight = getChild("download"); + mSelectedPhysicsWeight = getChild("physics"); + mSelectedServerWeight = getChild("server"); + mSelectedDisplayWeight = getChild("display"); + + mSelectedOnLand = getChild("used_download_weight"); + mRezzedOnLand = getChild("used_download_weight"); + mRemainingCapacity = getChild("used_download_weight"); + mTotalCapacity = getChild("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); +} -- cgit v1.2.3