summaryrefslogtreecommitdiffstats
path: root/gui/animation.cpp
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2014-02-07 23:58:09 +0100
committerGerrit Code Review <gerrit2@gerrit>2014-02-12 18:30:41 +0100
commitede51c528e5cebc7f1930d5c9da541e7d11c0138 (patch)
tree6ea3d7b2a5881cc0489f0b72ffeacd6d4adf7348 /gui/animation.cpp
parentAllow recovery to be restored if backup=1 flag is present in recovery.fstab (diff)
downloadandroid_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.gz
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.bz2
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.lz
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.xz
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.tar.zst
android_bootable_recovery-ede51c528e5cebc7f1930d5c9da541e7d11c0138.zip
Diffstat (limited to '')
-rw-r--r--gui/animation.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gui/animation.cpp b/gui/animation.cpp
index 8c922786d..771e1c116 100644
--- a/gui/animation.cpp
+++ b/gui/animation.cpp
@@ -26,7 +26,7 @@ extern "C" {
#include "objects.hpp"
-GUIAnimation::GUIAnimation(xml_node<>* node)
+GUIAnimation::GUIAnimation(xml_node<>* node) : GUIObject(node)
{
xml_node<>* child;
xml_attribute<>* attr;
@@ -101,6 +101,9 @@ GUIAnimation::GUIAnimation(xml_node<>* node)
int GUIAnimation::Render(void)
{
+ if(!isConditionTrue())
+ return 0;
+
if (!mAnimation || !mAnimation->GetResource(mFrame)) return -1;
gr_blit(mAnimation->GetResource(mFrame), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
@@ -109,6 +112,9 @@ int GUIAnimation::Render(void)
int GUIAnimation::Update(void)
{
+ if(!isConditionTrue())
+ return 0;
+
if (!mAnimation) return -1;
// Handle the "end-of-animation" state