summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-30 15:34:16 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-30 15:34:16 -0400
commit52ed6ac28697ffcfd7300602aec34db8eafc171a (patch)
tree128ab552521272aa2e1511a126f9c1668446130a /indra/newview
parent626ee6777e68c0df36c82290c8e00eaebe43b8b4 (diff)
SL-92 WIP - ui floater tweaks for hover height control
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloaterhoverheight.cpp12
-rwxr-xr-xindra/newview/llfloaterhoverheight.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp
index 5222f7bb3f..6f7f8374d2 100755
--- a/indra/newview/llfloaterhoverheight.cpp
+++ b/indra/newview/llfloaterhoverheight.cpp
@@ -37,11 +37,14 @@ LLFloaterHoverHeight::LLFloaterHoverHeight(const LLSD& key) : LLFloater(key)
BOOL LLFloaterHoverHeight::postBuild()
{
- LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset");
F32 value = offset[2];
+
+ LLSliderCtrl* sldrCtrl = getChild<LLSliderCtrl>("HoverHeightSlider");
sldrCtrl->setValue(value,FALSE);
+ sldrCtrl->setSliderMouseUpCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this));
+ sldrCtrl->setSliderEditorCommitCallback(boost::bind(&LLFloaterHoverHeight::onFinalCommit,this));
childSetCommitCallback("HoverHeightSlider", &LLFloaterHoverHeight::onSliderMoved, NULL);
return TRUE;
@@ -57,3 +60,10 @@ void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData)
offset[2] = value;
gSavedSettings.setVector3("AvatarPosFinalOffset",offset);
}
+
+// Do extra send-to-the-server work when slider drag completes, or new
+// value entered as text.
+void LLFloaterHoverHeight::onFinalCommit()
+{
+ LL_INFOS() << "FINAL FINAL!!!" << LL_ENDL;
+}
diff --git a/indra/newview/llfloaterhoverheight.h b/indra/newview/llfloaterhoverheight.h
index 4ede8f08e0..1aede19e57 100755
--- a/indra/newview/llfloaterhoverheight.h
+++ b/indra/newview/llfloaterhoverheight.h
@@ -36,6 +36,8 @@ public:
BOOL postBuild();
static void onSliderMoved(LLUICtrl* ctrl, void* userData);
+
+ void onFinalCommit();
};
#endif