summaryrefslogtreecommitdiffstats
path: root/gui/image.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-10-19 19:13:15 +0200
committerDees_Troy <dees_troy@teamw.in>2012-10-19 19:13:15 +0200
commit4d12f969b8fa40497b60a6e15873b1b3af924dda (patch)
tree103d138e3d4a1a6e23dd7f44a28bb8efdef73bb4 /gui/image.cpp
parentInitial BML support (ext4 only) (diff)
downloadandroid_bootable_recovery-4d12f969b8fa40497b60a6e15873b1b3af924dda.tar
android_bootable_recovery-4d12f969b8fa40497b60a6e15873b1b3af924dda.tar.gz
android_bootable_recovery-4d12f969b8fa40497b60a6e15873b1b3af924dda.tar.bz2
android_bootable_recovery-4d12f969b8fa40497b60a6e15873b1b3af924dda.tar.lz
android_bootable_recovery-4d12f969b8fa40497b60a6e15873b1b3af924dda.tar.xz
android_bootable_recovery-4d12f969b8fa40497b60a6e15873b1b3af924dda.tar.zst
android_bootable_recovery-4d12f969b8fa40497b60a6e15873b1b3af924dda.zip
Diffstat (limited to 'gui/image.cpp')
-rw-r--r--gui/image.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/image.cpp b/gui/image.cpp
index 44400e626..05e517867 100644
--- a/gui/image.cpp
+++ b/gui/image.cpp
@@ -32,6 +32,8 @@ GUIImage::GUIImage(xml_node<>* node)
xml_node<>* child;
mImage = NULL;
+ mHighlightImage = NULL;
+ isHighlighted = false;
if (!node)
return;
@@ -42,6 +44,9 @@ GUIImage::GUIImage(xml_node<>* node)
attr = child->first_attribute("resource");
if (attr)
mImage = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("highlightresource");
+ if (attr)
+ mHighlightImage = PageManager::FindResource(attr->value());
}
// Load the placement
@@ -75,7 +80,10 @@ GUIImage::GUIImage(xml_node<>* node)
int GUIImage::Render(void)
{
- if (!mImage || !mImage->GetResource()) return -1;
+ if (isHighlighted && mHighlightImage && mHighlightImage->GetResource()) {
+ gr_blit(mHighlightImage->GetResource(), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
+ return 0;
+ } else if (!mImage || !mImage->GetResource()) return -1;
gr_blit(mImage->GetResource(), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
return 0;
}