summaryrefslogtreecommitdiff
path: root/indra/llui/llfloaterreg.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-04-03 11:06:33 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-04-03 11:06:33 -0700
commit36a0a58487063152d8aacdeb22060025fe0021c7 (patch)
tree58a59dee2b88e1e51391987b157a37b3c8cd710b /indra/llui/llfloaterreg.cpp
parent8b5b0ace9bfb83540fbc73376b639180d6d63a3b (diff)
parentfa6add3fcd300b21142e3381f35851b3404ee02a (diff)
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-development.
Diffstat (limited to 'indra/llui/llfloaterreg.cpp')
-rw-r--r--indra/llui/llfloaterreg.cpp41
1 files changed, 35 insertions, 6 deletions
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index e144b68f5e..9115eb7174 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -96,7 +96,9 @@ LLFloater* LLFloaterReg::getLastFloaterCascading()
{
LLFloater* inst = *iter;
- if (inst->getVisible() && inst->isPositioning(LLFloaterEnums::OPEN_POSITIONING_CASCADING))
+ if (inst->getVisible()
+ && (inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADING)
+ || inst->isPositioning(LLFloaterEnums::POSITIONING_CASCADE_GROUP)))
{
if (candidate_rect.mTop > inst->getRect().mTop)
{
@@ -358,9 +360,7 @@ void LLFloaterReg::restoreVisibleInstances()
//static
std::string LLFloaterReg::getRectControlName(const std::string& name)
{
- std::string res = std::string("floater_rect_") + name;
- LLStringUtil::replaceChar( res, ' ', '_' );
- return res;
+ return std::string("floater_rect_") + getBaseControlName(name);
}
//static
@@ -368,19 +368,48 @@ std::string LLFloaterReg::declareRectControl(const std::string& name)
{
std::string controlname = getRectControlName(name);
LLFloater::getControlGroup()->declareRect(controlname, LLRect(),
- llformat("Window Position and Size for %s", name.c_str()),
+ llformat("Window Size for %s", name.c_str()),
TRUE);
return controlname;
}
+std::string LLFloaterReg::declarePosXControl(const std::string& name)
+{
+ std::string controlname = std::string("floater_pos_") + getBaseControlName(name) + "_x";
+ LLFloater::getControlGroup()->declareF32(controlname,
+ 10.f,
+ llformat("Window X Position for %s", name.c_str()),
+ TRUE);
+ return controlname;
+}
+
+std::string LLFloaterReg::declarePosYControl(const std::string& name)
+{
+ std::string controlname = std::string("floater_pos_") + getBaseControlName(name) + "_y";
+ LLFloater::getControlGroup()->declareF32(controlname,
+ 10.f,
+ llformat("Window Y Position for %s", name.c_str()),
+ TRUE);
+
+ return controlname;
+}
+
+
//static
std::string LLFloaterReg::getVisibilityControlName(const std::string& name)
{
- std::string res = std::string("floater_vis_") + name;
+ return std::string("floater_vis_") + getBaseControlName(name);
+}
+
+//static
+std::string LLFloaterReg::getBaseControlName(const std::string& name)
+{
+ std::string res(name);
LLStringUtil::replaceChar( res, ' ', '_' );
return res;
}
+
//static
std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
{