From 7d78440d9d3052ac81cee77199bca0f5414f2805 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 27 Apr 2010 22:35:54 +0300 Subject: Additional commit for EXT-6956 (Create perpetual loading indicator widget). - Made the indicator rotate clockwise (by flipping the images and reversing the order they're traversed). - The textures are now preloaded. Approved by Erica. --HG-- branch : product-engine --- indra/llui/llloadingindicator.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llloadingindicator.cpp b/indra/llui/llloadingindicator.cpp index 8dec6ea9df..f8b029e19c 100644 --- a/indra/llui/llloadingindicator.cpp +++ b/indra/llui/llloadingindicator.cpp @@ -78,10 +78,8 @@ void LLLoadingIndicator::Data::initSingleton() LLPointer LLLoadingIndicator::Data::getNextImage(S8& idx) const { - // Actually selects previous image because - // current images seem to be in wrong order; - // performs array bounds checking. - idx = idx > 0 ? llmin(NIMAGES-1, idx-1) : NIMAGES-1; + // Calculate next index, performing array bounds checking. + idx = (idx >= NIMAGES || idx < 0) ? 0 : (idx + 1) % NIMAGES; return mImages[idx]; } -- cgit v1.2.3