summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatersidepanelcontainer.cpp
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2011-09-27 21:05:05 +0300
committerSeth ProductEngine <slitovchuk@productengine.com>2011-09-27 21:05:05 +0300
commit0f3221e25d6261d7f29b5b37391156c07fde1d0c (patch)
treeb0bd6ec7e8f5434f2b715e6d0755912c9744fb14 /indra/newview/llfloatersidepanelcontainer.cpp
parenta80d5f2b46b21a8d1a48da4b4d2c740cb8260928 (diff)
EXP-1225 FIXED Added a floater for My Inventory side tab.
- Replaced calls to LLSideTray with LLFloaterSidePanelContainer. - Added LLFloaterSidePanelContainer::getPanel<T>() for getting custom type panels.
Diffstat (limited to 'indra/newview/llfloatersidepanelcontainer.cpp')
-rw-r--r--indra/newview/llfloatersidepanelcontainer.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp
index cf66fd1792..c73ec90a12 100644
--- a/indra/newview/llfloatersidepanelcontainer.cpp
+++ b/indra/newview/llfloatersidepanelcontainer.cpp
@@ -33,6 +33,9 @@
#include "llsidetraypanelcontainer.h"
#include "lltransientfloatermgr.h"
+//static
+const std::string LLFloaterSidePanelContainer::sMainPanelName("main_panel");
+
LLFloaterSidePanelContainer::LLFloaterSidePanelContainer(const LLSD& key, const Params& params)
: LLFloater(key, params)
{
@@ -48,7 +51,7 @@ LLFloaterSidePanelContainer::~LLFloaterSidePanelContainer()
void LLFloaterSidePanelContainer::onOpen(const LLSD& key)
{
- getChild<LLPanel>("main_panel")->onOpen(key);
+ getChild<LLPanel>(sMainPanelName)->onOpen(key);
}
LLPanel* LLFloaterSidePanelContainer::openChildPanel(const std::string& panel_name, const LLSD& params)
@@ -82,6 +85,17 @@ void LLFloaterSidePanelContainer::showPanel(const std::string& floater_name, con
LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
if (floaterp)
{
- floaterp->openChildPanel("main_panel", panel_name);
+ floaterp->openChildPanel(sMainPanelName, panel_name);
}
}
+
+LLPanel* LLFloaterSidePanelContainer::getPanel(const std::string& floater_name, const std::string& panel_name)
+{
+ LLFloaterSidePanelContainer* floaterp = LLFloaterReg::getTypedInstance<LLFloaterSidePanelContainer>(floater_name);
+ if (floaterp)
+ {
+ return floaterp->findChild<LLPanel>(panel_name, true);
+ }
+
+ return NULL;
+}