From 52ed6ac28697ffcfd7300602aec34db8eafc171a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 30 Sep 2014 15:34:16 -0400 Subject: SL-92 WIP - ui floater tweaks for hover height control --- indra/newview/llfloaterhoverheight.cpp | 12 +++++++++++- indra/newview/llfloaterhoverheight.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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(ctrl); LLVector3 offset = gSavedSettings.getVector3("AvatarPosFinalOffset"); F32 value = offset[2]; + + LLSliderCtrl* sldrCtrl = getChild("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 -- cgit v1.2.3