From 1dedd3de05503067b36096007eeb0bb6a6204587 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 19 Apr 2011 16:16:54 -0700 Subject: EXP-648 FIX As a developer, I want to be able to specify param blocks that use Multiple for a sequence of images Factored out param block data classes so that specialized param block types, such as LLUIImage, LLFontGL, LLRect, etc. can be stored in a Multiple context Converted loading_indicator to take image sequence from XUI deprecated name-value pairs for LLUIColor values, and put them in colors.xml --- indra/llui/llloadingindicator.h | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'indra/llui/llloadingindicator.h') diff --git a/indra/llui/llloadingindicator.h b/indra/llui/llloadingindicator.h index 4e4a224ef6..c0cb1cc74a 100644 --- a/indra/llui/llloadingindicator.h +++ b/indra/llui/llloadingindicator.h @@ -36,8 +36,8 @@ /** * Perpetual loading indicator (a la MacOSX or YouTube) * - * Number of rotations per second can be overriden - * with the "roations_per_sec" parameter. + * Number of rotations per second can be overridden + * with the "images_per_sec" parameter. * * Can start/stop spinning. * @@ -49,11 +49,24 @@ class LLLoadingIndicator { LOG_CLASS(LLLoadingIndicator); public: + + struct Images : public LLInitParam::Block + { + Multiple image; + + Images() + : image("image") + {} + }; + struct Params : public LLInitParam::Block { - Optional rotations_per_sec; + Optional images_per_sec; + Batch images; + Params() - : rotations_per_sec("rotations_per_sec", 1.0f) + : images_per_sec("images_per_sec", 1.0f), + images("images") {} }; @@ -74,14 +87,15 @@ public: private: LLLoadingIndicator(const Params&); - friend class LLUICtrlFactory; + void initFromParams(const Params&); - class Data; + friend class LLUICtrlFactory; - F32 mRotationsPerSec; + F32 mImagesPerSec; S8 mCurImageIdx; - LLPointer mCurImagep; LLFrameTimer mImageSwitchTimer; + + std::vector mImages; }; #endif // LL_LLLOADINGINDICATOR_H -- cgit v1.2.3