summaryrefslogtreecommitdiff
path: root/indra/llui/llfloaterreg.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-06-07 22:30:54 -0700
committerMerov Linden <merov@lindenlab.com>2012-06-07 22:30:54 -0700
commitbc54f1bb89452467ca8b652e4b961444d9c4be8d (patch)
treeb5aac588bc7ec1506456eaf5967e9a7930b42fc0 /indra/llui/llfloaterreg.cpp
parent05d721cecfa0c20a6fd8498a18f36cde7014248e (diff)
parenta519e34f02b4b2663fe082ba9ad12f1b423669cb (diff)
Merge : pull from lindenlab/viewer-release
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)
{