aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-03 19:18:35 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitbcb2a5bd8d8f7fc3141f5e8219c47e0342c4692e (patch)
tree53971e7b91eae678be5a15d0cb48de249e722031 /backends
parent2a15b8b280af4d4beddb142e468f511a65552e2d (diff)
downloadscummvm-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')
-rw-r--r--backends/networking/curl/cloudicon.cpp20
-rw-r--r--backends/networking/curl/cloudicon.h1
2 files changed, 13 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;
}
}
diff --git a/backends/networking/curl/cloudicon.h b/backends/networking/curl/cloudicon.h
index dc28c8290d..24c1fd6f71 100644
--- a/backends/networking/curl/cloudicon.h
+++ b/backends/networking/curl/cloudicon.h
@@ -27,6 +27,7 @@ namespace Networking {
class CloudIcon {
int _frame;
+ bool _wasVisible;
public:
CloudIcon();