diff options
author | Gigs Taggart | 2008-09-19 20:59:32 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-19 20:59:32 -0500 |
commit | bbe49803b67fe660702e638208b2b4c9a79036a3 (patch) | |
tree | 40cdd4835714bc3cebd46dec2182b8c524d8acb6 /linden/indra/newview/llfloatertools.cpp | |
parent | New optional SConstruct flag to specify an exact path to build (diff) | |
download | meta-impy-bbe49803b67fe660702e638208b2b4c9a79036a3.zip meta-impy-bbe49803b67fe660702e638208b2b4c9a79036a3.tar.gz meta-impy-bbe49803b67fe660702e638208b2b4c9a79036a3.tar.bz2 meta-impy-bbe49803b67fe660702e638208b2b4c9a79036a3.tar.xz |
VWR-2331: Terraform tool variable "strength".
Contributing authors: Gigs Taggart, Aimee Trescothick, Which Linden.
Diffstat (limited to 'linden/indra/newview/llfloatertools.cpp')
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 97150e3..8d4d6e2 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -54,6 +54,7 @@ | |||
54 | #include "llpanelvolume.h" | 54 | #include "llpanelvolume.h" |
55 | #include "llpanelpermissions.h" | 55 | #include "llpanelpermissions.h" |
56 | #include "llselectmgr.h" | 56 | #include "llselectmgr.h" |
57 | #include "llslider.h" | ||
57 | #include "llstatusbar.h" | 58 | #include "llstatusbar.h" |
58 | #include "lltabcontainer.h" | 59 | #include "lltabcontainer.h" |
59 | #include "lltextbox.h" | 60 | #include "lltextbox.h" |
@@ -106,6 +107,7 @@ void click_popup_rotate_reset(void*); | |||
106 | void click_popup_rotate_right(void*); | 107 | void click_popup_rotate_right(void*); |
107 | void click_popup_dozer_mode(LLUICtrl *, void *user); | 108 | void click_popup_dozer_mode(LLUICtrl *, void *user); |
108 | void click_popup_dozer_size(LLUICtrl *, void *user); | 109 | void click_popup_dozer_size(LLUICtrl *, void *user); |
110 | void commit_slider_dozer_force(LLUICtrl *, void*); | ||
109 | void click_dozer_size(LLUICtrl *, void*); | 111 | void click_dozer_size(LLUICtrl *, void*); |
110 | void click_apply_to_selection(void*); | 112 | void click_apply_to_selection(void*); |
111 | void commit_radio_zoom(LLUICtrl *, void*); | 113 | void commit_radio_zoom(LLUICtrl *, void*); |
@@ -308,6 +310,12 @@ BOOL LLFloaterTools::postBuild() | |||
308 | childSetAction("button apply to selection",click_apply_to_selection, (void*)0); | 310 | childSetAction("button apply to selection",click_apply_to_selection, (void*)0); |
309 | mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners"); | 311 | mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners"); |
310 | childSetValue("checkbox show owners",gSavedSettings.getBOOL("ShowParcelOwners")); | 312 | childSetValue("checkbox show owners",gSavedSettings.getBOOL("ShowParcelOwners")); |
313 | |||
314 | mSliderDozerForce = getChild<LLSlider>("slider force"); | ||
315 | childSetCommitCallback("slider force",commit_slider_dozer_force, (void*)0); | ||
316 | // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here | ||
317 | childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce"))); | ||
318 | |||
311 | childSetAction("button more", click_show_more, this); | 319 | childSetAction("button more", click_show_more, this); |
312 | childSetAction("button less", click_show_more, this); | 320 | childSetAction("button less", click_show_more, this); |
313 | mTab = getChild<LLTabContainer>("Object Info Tabs"); | 321 | mTab = getChild<LLTabContainer>("Object Info Tabs"); |
@@ -741,6 +749,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) | |||
741 | { | 749 | { |
742 | mCheckShowOwners ->setVisible( land_visible ); | 750 | mCheckShowOwners ->setVisible( land_visible ); |
743 | } | 751 | } |
752 | if (mSliderDozerForce) | ||
753 | { | ||
754 | mSliderDozerForce ->setVisible( land_visible ); | ||
755 | childSetVisible("Force:", land_visible); | ||
756 | } | ||
744 | 757 | ||
745 | // | 758 | // |
746 | // More panel visibility | 759 | // More panel visibility |
@@ -939,6 +952,16 @@ void click_dozer_size(LLUICtrl *ctrl, void *user) | |||
939 | gSavedSettings.setS32("RadioLandBrushSize", size); | 952 | gSavedSettings.setS32("RadioLandBrushSize", size); |
940 | } | 953 | } |
941 | 954 | ||
955 | void commit_slider_dozer_force(LLUICtrl *ctrl, void*) | ||
956 | { | ||
957 | // the slider is logarithmic, so we exponentiate to get the actual force multiplier | ||
958 | F32 dozer_force = pow(10.f, (F32)ctrl->getValue().asReal()); | ||
959 | gSavedSettings.setF32("LandBrushForce", dozer_force); | ||
960 | } | ||
961 | |||
962 | |||
963 | |||
964 | |||
942 | void click_apply_to_selection(void* user) | 965 | void click_apply_to_selection(void* user) |
943 | { | 966 | { |
944 | LLToolBrushLand::getInstance()->modifyLandInSelectionGlobal(); | 967 | LLToolBrushLand::getInstance()->modifyLandInSelectionGlobal(); |