diff options
author | Richard Linden <none@none> | 2010-10-08 17:38:19 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-10-08 17:38:19 -0700 |
commit | c25216ca3a1bc4bd7a88a2519fe156a00902e85c (patch) | |
tree | 44dee6f5dbfd63531f66595503490ca2a3c9028e /indra/llui | |
parent | f65bd3c1f18675910c9d49db217a1926bd04494e (diff) | |
parent | 77d1fa974ad6cc9be0b84e574b455693bfa7f702 (diff) |
merge
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llprogressbar.cpp | 6 | ||||
-rw-r--r-- | indra/llui/llprogressbar.h | 8 |
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(); |