summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-10-08 15:56:34 -0700
committerRichard Linden <none@none>2010-10-08 15:56:34 -0700
commit688c2a73cdf982a4fe5ee0bfea0a52135fc461ef (patch)
tree433876666ae1b480c56c5728a5b2c143e70cd41d
parentbd4afcfba29a763d2253b59a86ec48228a1c6fa8 (diff)
made progressbar derive from lluictrl and take percentage as llsd value
-rw-r--r--indra/llui/llprogressbar.cpp6
-rw-r--r--indra/llui/llprogressbar.h8
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp2
-rw-r--r--indra/newview/llprogressview.cpp2
4 files changed, 9 insertions, 9 deletions
diff --git a/indra/llui/llprogressbar.cpp b/indra/llui/llprogressbar.cpp
index aaa328754d..ead22686bc 100644
--- a/indra/llui/llprogressbar.cpp
+++ b/indra/llui/llprogressbar.cpp
@@ -50,7 +50,7 @@ LLProgressBar::Params::Params()
LLProgressBar::LLProgressBar(const LLProgressBar::Params& p)
-: LLView(p),
+: LLUICtrl(p),
mImageBar(p.image_bar),
mImageFill(p.image_fill),
mColorBackground(p.color_bg()),
@@ -80,7 +80,7 @@ void LLProgressBar::draw()
mImageFill->draw(progress_rect, bar_color);
}
-void LLProgressBar::setPercent(const F32 percent)
+void LLProgressBar::setValue(const LLSD& value)
{
- mPercentDone = llclamp(percent, 0.f, 100.f);
+ mPercentDone = llclamp((F32)value.asReal(), 0.f, 100.f);
}
diff --git a/indra/llui/llprogressbar.h b/indra/llui/llprogressbar.h
index 13297f7493..3f308e7496 100644
--- a/indra/llui/llprogressbar.h
+++ b/indra/llui/llprogressbar.h
@@ -27,14 +27,14 @@
#ifndef LL_LLPROGRESSBAR_H
#define LL_LLPROGRESSBAR_H
-#include "llview.h"
+#include "lluictrl.h"
#include "llframetimer.h"
class LLProgressBar
- : public LLView
+ : public LLUICtrl
{
public:
- struct Params : public LLInitParam::Block<Params, LLView::Params>
+ struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
{
Optional<LLUIImage*> image_bar,
image_fill;
@@ -47,7 +47,7 @@ public:
LLProgressBar(const Params&);
virtual ~LLProgressBar();
- void setPercent(const F32 percent);
+ void setValue(const LLSD& value);
/*virtual*/ void draw();
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index de2428feed..614700fb0a 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -519,7 +519,7 @@ void LLPanelPrimMediaControls::updateShape()
if(LLPluginClassMediaOwner::MEDIA_LOADING == media_plugin->getStatus())
{
mMediaProgressPanel->setVisible(true);
- mMediaProgressBar->setPercent(media_plugin->getProgressPercent());
+ mMediaProgressBar->setValue(media_plugin->getProgressPercent());
}
else
{
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index e9504cbba0..db02d76139 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -207,7 +207,7 @@ void LLProgressView::setText(const std::string& text)
void LLProgressView::setPercent(const F32 percent)
{
- mProgressBar->setPercent(percent);
+ mProgressBar->setValue(percent);
}
void LLProgressView::setMessage(const std::string& msg)