diff options
author | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
commit | 117e22047c5752352342d64e3fb7ce00a4eb8113 (patch) | |
tree | e32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/newview/llfloatertools.cpp | |
parent | Second Life viewer sources 1.18.0.6 (diff) | |
download | meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2 meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz |
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/newview/llfloatertools.cpp')
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 3748131..df5d488 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -73,7 +73,6 @@ | |||
73 | #include "llviewerparcelmgr.h" | 73 | #include "llviewerparcelmgr.h" |
74 | #include "llviewerwindow.h" | 74 | #include "llviewerwindow.h" |
75 | #include "llviewercontrol.h" | 75 | #include "llviewercontrol.h" |
76 | #include "llvolumesliderctrl.h" | ||
77 | #include "viewer.h" | 76 | #include "viewer.h" |
78 | 77 | ||
79 | #include "llvieweruictrlfactory.h" | 78 | #include "llvieweruictrlfactory.h" |
@@ -195,7 +194,6 @@ BOOL LLFloaterTools::postBuild() | |||
195 | childSetAction("button land",LLFloaterTools::setEditTool, (void*)gToolParcel); | 194 | childSetAction("button land",LLFloaterTools::setEditTool, (void*)gToolParcel); |
196 | mTextStatus = LLUICtrlFactory::getTextBoxByName(this,"text status"); | 195 | mTextStatus = LLUICtrlFactory::getTextBoxByName(this,"text status"); |
197 | mRadioZoom = LLUICtrlFactory::getCheckBoxByName(this,"radio zoom"); | 196 | mRadioZoom = LLUICtrlFactory::getCheckBoxByName(this,"radio zoom"); |
198 | mSliderZoom = LLViewerUICtrlFactory::getVolumeSliderByName(this,"slider zoom"); | ||
199 | childSetCommitCallback("slider zoom",commit_slider_zoom,this); | 197 | childSetCommitCallback("slider zoom",commit_slider_zoom,this); |
200 | mRadioOrbit = LLUICtrlFactory::getCheckBoxByName(this,"radio orbit"); | 198 | mRadioOrbit = LLUICtrlFactory::getCheckBoxByName(this,"radio orbit"); |
201 | childSetCommitCallback("radio orbit",commit_radio_orbit,this); | 199 | childSetCommitCallback("radio orbit",commit_radio_orbit,this); |
@@ -496,8 +494,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
496 | mRadioZoom ->setVisible( focus_visible ); | 494 | mRadioZoom ->setVisible( focus_visible ); |
497 | mRadioOrbit ->setVisible( focus_visible ); | 495 | mRadioOrbit ->setVisible( focus_visible ); |
498 | mRadioPan ->setVisible( focus_visible ); | 496 | mRadioPan ->setVisible( focus_visible ); |
499 | mSliderZoom ->setVisible( focus_visible ); | 497 | childSetVisible("slider zoom", focus_visible); |
500 | 498 | ||
501 | mRadioZoom ->set( !gCameraBtnOrbit && | 499 | mRadioZoom ->set( !gCameraBtnOrbit && |
502 | !gCameraBtnPan && | 500 | !gCameraBtnPan && |
503 | !(mask == MASK_ORBIT) && | 501 | !(mask == MASK_ORBIT) && |
@@ -514,7 +512,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
514 | (mask == (MASK_PAN | MASK_ALT)) ); | 512 | (mask == (MASK_PAN | MASK_ALT)) ); |
515 | 513 | ||
516 | // multiply by correction factor because volume sliders go [0, 0.5] | 514 | // multiply by correction factor because volume sliders go [0, 0.5] |
517 | mSliderZoom ->setValue( gAgent.getCameraZoomFraction() * 0.5f); | 515 | childSetValue( "slider zoom", gAgent.getCameraZoomFraction() * 0.5f); |
518 | 516 | ||
519 | // Move buttons | 517 | // Move buttons |
520 | BOOL move_visible = (tool == gToolGrab); | 518 | BOOL move_visible = (tool == gToolGrab); |
@@ -853,9 +851,8 @@ void commit_radio_pan(LLUICtrl *, void*) | |||
853 | 851 | ||
854 | void commit_slider_zoom(LLUICtrl *ctrl, void*) | 852 | void commit_slider_zoom(LLUICtrl *ctrl, void*) |
855 | { | 853 | { |
856 | LLVolumeSliderCtrl* slider = (LLVolumeSliderCtrl*)ctrl; | ||
857 | // renormalize value, since max "volume" level is 0.5 for some reason | 854 | // renormalize value, since max "volume" level is 0.5 for some reason |
858 | F32 zoom_level = (F32)slider->getValue().asReal() * 2.f; // / 0.5f; | 855 | F32 zoom_level = (F32)ctrl->getValue().asReal() * 2.f; // / 0.5f; |
859 | gAgent.setCameraZoomFraction(zoom_level); | 856 | gAgent.setCameraZoomFraction(zoom_level); |
860 | } | 857 | } |
861 | 858 | ||