summaryrefslogtreecommitdiff
path: root/indra/llui
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 /indra/llui
parentbd4afcfba29a763d2253b59a86ec48228a1c6fa8 (diff)
made progressbar derive from lluictrl and take percentage as llsd value
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llprogressbar.cpp6
-rw-r--r--indra/llui/llprogressbar.h8
2 files changed, 7 insertions, 7 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();