diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfloaterhoverheight.cpp | 12 | ||||
-rwxr-xr-x | indra/newview/llfloaterhoverheight.h | 2 |
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 |