diff options
author | Richard Linden <none@none> | 2013-07-08 00:55:17 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-07-08 00:55:17 -0700 |
commit | d122318bef2ff0eced7641dc24f411f792bd2935 (patch) | |
tree | 7c5bfc2c60058d6f87ad9c18c08f844424f3efc9 /indra/llui/llstatbar.h | |
parent | bc7d2b76961c0397dcd108e625db4304855f4539 (diff) |
SH-4299 WIP: Interesting: High fps shown temporarily off scale in statistics console
added percentage/ratio units
added auto-range and auto tick calculation to stat bar to automate display stats
Diffstat (limited to 'indra/llui/llstatbar.h')
-rwxr-xr-x | indra/llui/llstatbar.h | 75 |
1 files changed, 35 insertions, 40 deletions
diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 3daec297bb..a0299c0efb 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -42,11 +42,9 @@ public: Optional<F32> bar_min, bar_max, - tick_spacing, - update_rate, - unit_scale; + tick_spacing; - Optional<U32> precision; + Optional<U32> decimal_digits; Optional<bool> show_per_sec, show_bar, @@ -60,23 +58,21 @@ public: Optional<EOrientation> orientation; Params() - : label("label"), - unit_label("unit_label"), - bar_min("bar_min", 0.0f), - bar_max("bar_max", 50.0f), - tick_spacing("tick_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), - show_mean("show_mean", true), - scale_range("scale_range", true), - num_frames("num_frames", 300), - max_height("max_height", 200), - stat("stat"), - orientation("orientation", VERTICAL) + : label("label"), + unit_label("unit_label"), + bar_min("bar_min", 0.0f), + bar_max("bar_max", 0.0f), + tick_spacing("tick_spacing", 10.0f), + decimal_digits("decimal_digits", 3), + show_per_sec("show_per_sec", true), + show_bar("show_bar", false), + show_history("show_history", false), + show_mean("show_mean", true), + scale_range("scale_range", true), + num_frames("num_frames", 200), + max_height("max_height", 100), + stat("stat"), + orientation("orientation", VERTICAL) { changeDefault(follows.flags, FOLLOWS_TOP | FOLLOWS_LEFT); } @@ -85,40 +81,39 @@ public: virtual void draw(); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual BOOL handleHover(S32 x, S32 y, MASK mask); void setStat(const std::string& stat_name); - void setRange(F32 bar_min, F32 bar_max, F32 tick_spacing); + void setRange(F32 bar_min, F32 bar_max); void getRange(F32& bar_min, F32& bar_max) { bar_min = mMinBar; bar_max = mMaxBar; } /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. private: - F32 mMinBar; - F32 mMaxBar; - F32 mCurMaxBar; - F32 mTickSpacing; - F32 mLabelSpacing; - U32 mPrecision; - F32 mUpdatesPerSec; - F32 mUnitScale; + F32 mMinBar, + mMaxBar, + mCurMaxBar, + mCurMinBar, + mLabelSpacing; + F32 mTickValue; + U32 mDecimalDigits; S32 mNumFrames; S32 mMaxHeight; - bool mPerSec; // Use the per sec stats. - bool mDisplayBar; // Display the bar graph. - bool mDisplayHistory; - bool mDisplayMean; // If true, display mean, if false, display current value - bool mScaleRange; + bool mPerSec, // Use the per sec stats. + mDisplayBar, // Display the bar graph. + mDisplayHistory, + mDisplayMean, // If true, display mean, if false, display current value + mScaleMax, + mScaleMin; EOrientation mOrientation; - LLTrace::TraceType<LLTrace::CountAccumulator>* mCountFloatp; - LLTrace::TraceType<LLTrace::EventAccumulator>* mEventFloatp; - LLTrace::TraceType<LLTrace::SampleAccumulator>* mSampleFloatp; + LLTrace::TraceType<LLTrace::CountAccumulator>* mCountFloatp; + LLTrace::TraceType<LLTrace::EventAccumulator>* mEventFloatp; + LLTrace::TraceType<LLTrace::SampleAccumulator>* mSampleFloatp; - LLFrameTimer mUpdateTimer; LLUIString mLabel; std::string mUnitLabel; - F32 mValue; }; #endif |