summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2021-04-28 13:14:51 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2021-04-28 13:14:51 +0300
commita91e22731998230f9b41d6d86328b66bf7a122ae (patch)
tree3ef981dbca450b0f2d4f761abc1fc4dc63daba9a /indra
parentdb8a55c2e606b77cc4bf758dd7b4228e37269eab (diff)
SL-15174 set Starting Guidebook location on-screen
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/llfloater.cpp18
-rw-r--r--indra/llui/llfloater.h6
-rw-r--r--indra/newview/skins/default/xui/en/floater_how_to.xml2
3 files changed, 25 insertions, 1 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index c03b024dd5..3680e20f15 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -199,7 +199,9 @@ LLFloater::Params::Params()
help_pressed_image("help_pressed_image"),
open_callback("open_callback"),
close_callback("close_callback"),
- follows("follows")
+ follows("follows"),
+ rel_x("rel_x", 0),
+ rel_y("rel_y", 0)
{
changeDefault(visible, false);
}
@@ -268,6 +270,8 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mHasBeenDraggedWhileMinimized(FALSE),
mPreviousMinimizedBottom(0),
mPreviousMinimizedLeft(0),
+ mDefaultRelativeX(p.rel_x),
+ mDefaultRelativeY(p.rel_y),
mMinimizeSignal(NULL)
// mNotificationContext(NULL)
{
@@ -935,6 +939,15 @@ bool LLFloater::applyRectControl()
saved_rect = true;
}
+ else if ((mDefaultRelativeX != 0) && (mDefaultRelativeY != 0))
+ {
+ mPosition.mX = mDefaultRelativeX;
+ mPosition.mY = mDefaultRelativeY;
+ mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
+ applyRelativePosition();
+
+ saved_rect = true;
+ }
// remember updated position
if (rect_specified)
@@ -3200,6 +3213,9 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
mSingleInstance = p.single_instance;
mReuseInstance = p.reuse_instance.isProvided() ? p.reuse_instance : p.single_instance;
+ mDefaultRelativeX = p.rel_x;
+ mDefaultRelativeY = p.rel_y;
+
mPositioning = p.positioning;
mSaveRect = p.save_rect;
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index f8c04e8a2f..2672d600c6 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -172,6 +172,9 @@ public:
Optional<S32> header_height,
legacy_header_height; // HACK see initFromXML()
+ Optional<F32> rel_x,
+ rel_y;
+
// Images for top-right controls
Optional<LLUIImage*> close_image,
restore_image,
@@ -521,6 +524,9 @@ private:
BOOL mHasBeenDraggedWhileMinimized;
S32 mPreviousMinimizedBottom;
S32 mPreviousMinimizedLeft;
+
+ F32 mDefaultRelativeX;
+ F32 mDefaultRelativeY;
};
diff --git a/indra/newview/skins/default/xui/en/floater_how_to.xml b/indra/newview/skins/default/xui/en/floater_how_to.xml
index b4dd2e252f..acfa6a5152 100644
--- a/indra/newview/skins/default/xui/en/floater_how_to.xml
+++ b/indra/newview/skins/default/xui/en/floater_how_to.xml
@@ -12,4 +12,6 @@
save_rect="true"
title="WELCOME ISLAND GUIDEBOOK"
width="310"
+ rel_x="-0.469309"
+ rel_y="-0.011166"
filename="floater_web_content.xml"/> \ No newline at end of file