summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmultislider.cpp15
-rw-r--r--indra/llui/llmultislider.h5
-rw-r--r--indra/llui/llmultisliderctrl.h3
3 files changed, 23 insertions, 0 deletions
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index f30ce28b9d..61e8bdd38c 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -315,6 +315,21 @@ LLRect LLMultiSlider::getSliderThumbRect(const std::string& name) const
return LLRect();
}
+void LLMultiSlider::setSliderThumbImage(const std::string &name)
+{
+ if (!name.empty())
+ {
+ mThumbImagep = LLUI::getUIImage(name);
+ }
+ else
+ clearSliderThumbImage();
+}
+
+void LLMultiSlider::clearSliderThumbImage()
+{
+ mThumbImagep = NULL;
+}
+
void LLMultiSlider::resetCurSlider()
{
mCurSlider = LLStringUtil::null;
diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h
index b4331e11c0..b0fca2597d 100644
--- a/indra/llui/llmultislider.h
+++ b/indra/llui/llmultislider.h
@@ -82,6 +82,10 @@ public:
F32 getSliderValueFromPos(S32 xpos, S32 ypos) const;
LLRect getSliderThumbRect(const std::string& name) const;
+ void setSliderThumbImage(const std::string &name);
+ void clearSliderThumbImage();
+
+
const std::string& getCurSlider() const { return mCurSlider; }
F32 getCurSliderValue() const { return getSliderValue(mCurSlider); }
void setCurSlider(const std::string& name);
@@ -113,6 +117,7 @@ public:
F32 getOverlapThreshold() { return mOverlapThreshold; }
bool canAddSliders() { return mValue.size() < mMaxNumSliders; }
+
protected:
LLSD mValue;
std::string mCurSlider;
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index 20d204a6dc..e16737b3c7 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -110,6 +110,9 @@ public:
F32 getSliderValueFromPos(S32 x, S32 y) const { return mMultiSlider->getSliderValueFromPos(x, y); }
LLRect getSliderThumbRect(const std::string &name) const { return mMultiSlider->getSliderThumbRect(name); }
+ void setSliderThumbImage(const std::string &name) { mMultiSlider->setSliderThumbImage(name); }
+ void clearSliderThumbImage() { mMultiSlider->clearSliderThumbImage(); }
+
/// for adding and deleting sliders
const std::string& addSlider();
const std::string& addSlider(F32 val);