summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmultislider.cpp9
-rw-r--r--indra/llui/llmultislider.h1
-rw-r--r--indra/llui/llmultisliderctrl.h3
3 files changed, 12 insertions, 1 deletions
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index ed93b3d44c..f30ce28b9d 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -306,6 +306,15 @@ F32 LLMultiSlider::getSliderValueFromPos(S32 xpos, S32 ypos) const
return((t * (mMaxValue - mMinValue)) + mMinValue);
}
+
+LLRect LLMultiSlider::getSliderThumbRect(const std::string& name) const
+{
+ auto it = mThumbRects.find(name);
+ if (it != mThumbRects.end())
+ return (*it).second;
+ return LLRect();
+}
+
void LLMultiSlider::resetCurSlider()
{
mCurSlider = LLStringUtil::null;
diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h
index 50cf62e9c5..b4331e11c0 100644
--- a/indra/llui/llmultislider.h
+++ b/indra/llui/llmultislider.h
@@ -80,6 +80,7 @@ public:
void setSliderValue(const std::string& name, F32 value, BOOL from_event = FALSE);
F32 getSliderValue(const std::string& name) const;
F32 getSliderValueFromPos(S32 xpos, S32 ypos) const;
+ LLRect getSliderThumbRect(const std::string& name) const;
const std::string& getCurSlider() const { return mCurSlider; }
F32 getCurSliderValue() const { return getSliderValue(mCurSlider); }
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index 75715d6043..20d204a6dc 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -107,7 +107,8 @@ public:
void setMaxValue(F32 max_value) {mMultiSlider->setMaxValue(max_value);}
void setIncrement(F32 increment) {mMultiSlider->setIncrement(increment);}
- F32 getSliderValueFromPos(S32 x, S32 y) const { return mMultiSlider->getSliderValueFromPos(x, y); }
+ F32 getSliderValueFromPos(S32 x, S32 y) const { return mMultiSlider->getSliderValueFromPos(x, y); }
+ LLRect getSliderThumbRect(const std::string &name) const { return mMultiSlider->getSliderThumbRect(name); }
/// for adding and deleting sliders
const std::string& addSlider();