summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-11-23 13:52:40 +0800
committerangela <angela@lindenlab.com>2009-11-23 13:52:40 +0800
commite367e2efc23321d94ec4a4ae0264f885b4f0333b (patch)
tree473692bba6ba35fccd34f06c51792e6da7027c14
parent67c832d94b53fb5d32ec27eebf7f57b668e899db (diff)
EXT-2159 Create Vertical Slider to use for zoom in / out controls in view
-rw-r--r--indra/llui/llsliderctrl.cpp3
-rw-r--r--indra/llui/llsliderctrl.h4
-rw-r--r--indra/newview/skins/default/xui/en/floater_test_slider.xml15
3 files changed, 19 insertions, 3 deletions
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index ed22c0a47f..ac35bc7992 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -122,7 +122,8 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p)
slider_p.min_value.setIfNotProvided(p.min_value);
slider_p.max_value.setIfNotProvided(p.max_value);
slider_p.increment.setIfNotProvided(p.increment);
-
+ slider_p.orientation.setIfNotProvided(p.orientation);
+
slider_p.commit_callback.function(&LLSliderCtrl::onSliderCommit);
slider_p.control_name(p.control_name);
slider_p.mouse_down_callback( p.mouse_down_callback );
diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h
index 4a1574d502..c425849782 100644
--- a/indra/llui/llsliderctrl.h
+++ b/indra/llui/llsliderctrl.h
@@ -46,6 +46,7 @@ class LLSliderCtrl : public LLF32UICtrl
public:
struct Params : public LLInitParam::Block<Params, LLF32UICtrl::Params>
{
+ Optional<std::string> orientation;
Optional<S32> label_width;
Optional<S32> text_width;
Optional<bool> show_text;
@@ -78,7 +79,8 @@ public:
value_text("value_text"),
slider_label("slider_label"),
mouse_down_callback("mouse_down_callback"),
- mouse_up_callback("mouse_up_callback")
+ mouse_up_callback("mouse_up_callback"),
+ orientation("orientation", std::string ("horizontal"))
{}
};
protected:
diff --git a/indra/newview/skins/default/xui/en/floater_test_slider.xml b/indra/newview/skins/default/xui/en/floater_test_slider.xml
index 86ff82e01f..85d8bb2bb1 100644
--- a/indra/newview/skins/default/xui/en/floater_test_slider.xml
+++ b/indra/newview/skins/default/xui/en/floater_test_slider.xml
@@ -2,7 +2,7 @@
<floater
legacy_header_height="18"
can_resize="true"
- height="400"
+ height="500"
layout="topleft"
name="floater_test_slider"
help_topic="floater_test_slider"
@@ -84,4 +84,17 @@
name="red_slider"
text_color="red"
text_width="40" />
+ <slider
+ width ="140"
+ bottom="490"
+ decimal_digits="1"
+ height="100"
+ left="20"
+ label="Red Slider Vertical"
+ label_width="100"
+ layout="topleft"
+ name="red_slider_vertical"
+ text_color="red"
+ orientation="vertical"
+ text_width="20" />
</floater>