diff options
author | richard <none@none> | 2010-02-05 11:32:33 -0800 |
---|---|---|
committer | richard <none@none> | 2010-02-05 11:32:33 -0800 |
commit | ddfc6efbeeda5d2b08888a7ae0f04df242326e26 (patch) | |
tree | 5bbfba7e0afaf66a83e5db1b1a67c2a0462fe12b /indra/newview/llfloatercamera.cpp | |
parent | fed6c9eb0fa58559c13729b65ecee181f58f3c69 (diff) |
EXT-5025 - Tooltips block mouse clicks
EXT-4547 [BSI] it is possible to highlight multiple layers of chat
EXT-3844 Mouse wheel camera zoom is not reflected on View popup slider
EXT-3103 Add an option to restrict entering non-ascii symbols in text editor.
reviewed by Leyla
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r-- | indra/newview/llfloatercamera.cpp | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 9496e94780..ecb6254f8a 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -65,7 +65,7 @@ public: LLPanelCameraZoom(); /* virtual */ BOOL postBuild(); - /* virtual */ void onOpen(const LLSD& key); + /* virtual */ void draw(); protected: void onZoomPlusHeldDown(); @@ -73,7 +73,6 @@ protected: void onSliderValueChanged(); private: - F32 mSavedSliderVal; LLButton* mPlusBtn; LLButton* mMinusBtn; LLSlider* mSlider; @@ -88,8 +87,7 @@ static LLRegisterPanelClassWrapper<LLPanelCameraZoom> t_camera_zoom_panel("camer LLPanelCameraZoom::LLPanelCameraZoom() : mPlusBtn( NULL ), mMinusBtn( NULL ), - mSlider( NULL ), - mSavedSliderVal(0.f) + mSlider( NULL ) { mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this)); mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this)); @@ -101,16 +99,13 @@ BOOL LLPanelCameraZoom::postBuild() mPlusBtn = getChild <LLButton> ("zoom_plus_btn"); mMinusBtn = getChild <LLButton> ("zoom_minus_btn"); mSlider = getChild <LLSlider> ("zoom_slider"); - mSlider->setMinValue(.0f); - mSlider->setMaxValue(8.f); return LLPanel::postBuild(); } -void LLPanelCameraZoom::onOpen(const LLSD& key) +void LLPanelCameraZoom::draw() { - LLVector3d to_focus = gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()) - gAgent.calcFocusPositionTargetGlobal(); - mSavedSliderVal = 8.f - (F32)to_focus.magVec(); // maximum minus current - mSlider->setValue( mSavedSliderVal ); + mSlider->setValue(gAgent.getCameraZoomFraction()); + LLPanel::draw(); } void LLPanelCameraZoom::onZoomPlusHeldDown() @@ -135,13 +130,8 @@ void LLPanelCameraZoom::onZoomMinusHeldDown() void LLPanelCameraZoom::onSliderValueChanged() { - F32 val = mSlider->getValueF32(); - F32 rate = val - mSavedSliderVal; - - gAgent.unlockView(); - gAgent.cameraOrbitIn(rate); - - mSavedSliderVal = val; + F32 zoom_level = mSlider->getValueF32(); + gAgent.setCameraZoomFraction(zoom_level); } void activate_camera_tool() |