diff options
author | Alexander Tkachev | 2016-06-04 21:40:09 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 1bcbab7ad23b7dd47392e0d7a1fd2e56b385b367 (patch) | |
tree | b2fee5c929e067492840f29da5ced6b815514566 /backends/networking/curl/cloudicon.cpp | |
parent | 602d17f5fd3f3d89716be9f2975f644512aeb12d (diff) | |
download | scummvm-rg350-1bcbab7ad23b7dd47392e0d7a1fd2e56b385b367.tar.gz scummvm-rg350-1bcbab7ad23b7dd47392e0d7a1fd2e56b385b367.tar.bz2 scummvm-rg350-1bcbab7ad23b7dd47392e0d7a1fd2e56b385b367.zip |
CLOUD: Add new cloudicon.png
Diffstat (limited to 'backends/networking/curl/cloudicon.cpp')
-rw-r--r-- | backends/networking/curl/cloudicon.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/backends/networking/curl/cloudicon.cpp b/backends/networking/curl/cloudicon.cpp index dfb870a2c6..d6a6b517ba 100644 --- a/backends/networking/curl/cloudicon.cpp +++ b/backends/networking/curl/cloudicon.cpp @@ -30,9 +30,9 @@ namespace Networking { -const float CloudIcon::ALPHA_STEP = 0.03; +const float CloudIcon::ALPHA_STEP = 0.025; const float CloudIcon::ALPHA_MAX = 1; -const float CloudIcon::ALPHA_MIN = 0.5; +const float CloudIcon::ALPHA_MIN = 0.6; CloudIcon::CloudIcon(): _wasVisible(false), _iconsInited(false), _currentAlpha(0), _alphaRising(true) { initIcons(); @@ -41,6 +41,7 @@ CloudIcon::CloudIcon(): _wasVisible(false), _iconsInited(false), _currentAlpha(0 CloudIcon::~CloudIcon() {} bool CloudIcon::draw() { + bool stop = false; initIcons(); Cloud::Storage *storage = CloudMan.getCurrentStorage(); @@ -51,7 +52,10 @@ bool CloudIcon::draw() { _wasVisible = true; } if (_alphaRising) { - _currentAlpha += ALPHA_STEP; + if (_currentAlpha < ALPHA_MIN) + _currentAlpha += 5 * ALPHA_STEP; + else + _currentAlpha += ALPHA_STEP; if (_currentAlpha > ALPHA_MAX) { _currentAlpha = ALPHA_MAX; _alphaRising = false; @@ -68,10 +72,10 @@ bool CloudIcon::draw() { } } else { _wasVisible = false; - _currentAlpha -= 3 * ALPHA_STEP; + _currentAlpha -= 5 * ALPHA_STEP; if (_currentAlpha <= 0) { _currentAlpha = 0; - return true; + stop = true; } } @@ -85,7 +89,7 @@ bool CloudIcon::draw() { } } - return false; + return stop; } void CloudIcon::initIcons() { |