summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-04-27 22:35:54 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-04-27 22:35:54 +0300
commit7d78440d9d3052ac81cee77199bca0f5414f2805 (patch)
tree3f967e33443a5fa0a63326282ee9768c2ff7567b /indra/llui
parent42aa72cd99b68698861c8bcbb555d2c2cf136f9d (diff)
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
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llloadingindicator.cpp6
1 files changed, 2 insertions, 4 deletions
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<LLUIImage> 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];
}