summaryrefslogtreecommitdiff
path: root/indra/llui/lllayoutstack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lllayoutstack.cpp')
-rw-r--r--indra/llui/lllayoutstack.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 4c730286da..c93f538570 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -229,7 +229,10 @@ LLLayoutStack::LLLayoutStack(const LLLayoutStack::Params& p)
mOpenTimeConstant(p.open_time_constant),
mCloseTimeConstant(p.close_time_constant),
mResizeBarOverlap(p.resize_bar_overlap)
-{}
+{
+ LLCriticalDamp::setInterpolantConstant(InterpDeltaCloseTime, mCloseTimeConstant);
+ LLCriticalDamp::setInterpolantConstant(InterpDeltaOpenTime, mOpenTimeConstant);
+}
LLLayoutStack::~LLLayoutStack()
{
@@ -592,7 +595,7 @@ bool LLLayoutStack::animatePanels()
{
if (!mAnimatedThisFrame)
{
- panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(mOpenTimeConstant));
+ panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 1.f, LLCriticalDamp::getInterpolant(InterpDeltaOpenTime));
if (panelp->mVisibleAmt > 0.99f)
{
panelp->mVisibleAmt = 1.f;
@@ -617,7 +620,7 @@ bool LLLayoutStack::animatePanels()
{
if (!mAnimatedThisFrame)
{
- panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
+ panelp->mVisibleAmt = lerp(panelp->mVisibleAmt, 0.f, LLCriticalDamp::getInterpolant(InterpDeltaCloseTime));
if (panelp->mVisibleAmt < 0.001f)
{
panelp->mVisibleAmt = 0.f;
@@ -644,7 +647,7 @@ bool LLLayoutStack::animatePanels()
{
if (!mAnimatedThisFrame)
{
- panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, collapse_state, LLCriticalDamp::getInterpolant(mCloseTimeConstant));
+ panelp->mCollapseAmt = lerp(panelp->mCollapseAmt, collapse_state, LLCriticalDamp::getInterpolant(InterpDeltaCloseTime));
}
if (llabs(panelp->mCollapseAmt - collapse_state) < 0.001f)
@@ -855,3 +858,4 @@ void LLLayoutStack::updateResizeBarLimits()
previous_visible_panelp = visible_panelp;
}
}
+