diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llstatbar.cpp | 6 | ||||
-rw-r--r-- | indra/llui/llstatbar.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 6b40f8d475..1bc9a9fc67 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -53,6 +53,7 @@ LLStatBar::LLStatBar(const Params& p) mLabelSpacing(p.label_spacing), mPrecision(p.precision), mUpdatesPerSec(p.update_rate), + mUnitScale(p.unit_scale), mPerSec(p.show_per_sec), mDisplayBar(p.show_bar), mDisplayHistory(p.show_history), @@ -148,6 +149,11 @@ void LLStatBar::draw() mean = recording.getMean(*mMeasurementIntp); } + current *= mUnitScale; + min *= mUnitScale; + max *= mUnitScale; + mean *= mUnitScale; + if ((mUpdatesPerSec == 0.f) || (mUpdateTimer.getElapsedTimeF32() > 1.f/mUpdatesPerSec) || (mValue == 0.f)) { if (mDisplayMean) diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 6aefb1e213..083da8444e 100644 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -44,7 +44,8 @@ public: bar_max, tick_spacing, label_spacing, - update_rate; + update_rate, + unit_scale; Optional<U32> precision; @@ -64,6 +65,7 @@ public: label_spacing("label_spacing", 10.0f), precision("precision", 0), update_rate("update_rate", 5.0f), + unit_scale("unit_scale", 1.f), show_per_sec("show_per_sec", true), show_bar("show_bar", TRUE), show_history("show_history", false), @@ -92,6 +94,7 @@ private: F32 mLabelSpacing; U32 mPrecision; F32 mUpdatesPerSec; + F32 mUnitScale; BOOL mPerSec; // Use the per sec stats. BOOL mDisplayBar; // Display the bar graph. BOOL mDisplayHistory; |