diff options
author | Alexander Tkachev | 2016-06-03 19:18:35 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | bcb2a5bd8d8f7fc3141f5e8219c47e0342c4692e (patch) | |
tree | 53971e7b91eae678be5a15d0cb48de249e722031 /backends/networking/curl/cloudicon.cpp | |
parent | 2a15b8b280af4d4beddb142e468f511a65552e2d (diff) | |
download | scummvm-rg350-bcb2a5bd8d8f7fc3141f5e8219c47e0342c4692e.tar.gz scummvm-rg350-bcb2a5bd8d8f7fc3141f5e8219c47e0342c4692e.tar.bz2 scummvm-rg350-bcb2a5bd8d8f7fc3141f5e8219c47e0342c4692e.zip |
CLOUD: Fix CloudIcon to use clearOSD()
Now only icon is shown.
Diffstat (limited to 'backends/networking/curl/cloudicon.cpp')
-rw-r--r-- | backends/networking/curl/cloudicon.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/backends/networking/curl/cloudicon.cpp b/backends/networking/curl/cloudicon.cpp index 477e864d82..e8c92592bf 100644 --- a/backends/networking/curl/cloudicon.cpp +++ b/backends/networking/curl/cloudicon.cpp @@ -27,23 +27,27 @@ namespace Networking { -CloudIcon::CloudIcon(): _frame(0) {} +CloudIcon::CloudIcon(): _frame(0), _wasVisible(false) {} CloudIcon::~CloudIcon() {} void CloudIcon::draw() { - Cloud::Storage *storage = CloudMan.getCurrentStorage(); - bool working = (storage && storage->isWorking()); - if (working) { - //buf = animation frame; + Cloud::Storage *storage = CloudMan.getCurrentStorage(); + if (storage && storage->isWorking()) { if (g_system) { + if (!_wasVisible) { + g_system->clearOSD(); + _wasVisible = true; + } + const Graphics::Surface *s = g_gui.theme()->getImageSurface(GUI::ThemeEngine::kImageLogoSmall); - int x = 10, y = 10; + int x = g_system->getOverlayWidth() - s->w - 10, y = 10; g_system->copyRectToOSD(s->getPixels(), s->pitch, x, y, s->w, s->h); + } else { + _wasVisible = false; } } else { - //buf = empty; - //TODO: put empty piece to OSD? + _wasVisible = false; } } |