summaryrefslogtreecommitdiffstats
path: root/gui/image.cpp
diff options
context:
space:
mode:
authorthat <github@that.at>2015-02-14 20:23:16 +0100
committerthat <github@that.at>2015-02-15 20:36:40 +0100
commitf6ed8fc1f51e368bb76905d9f1d2d3735e70a644 (patch)
treeba66418d418869274d259ce35cca8d4021d8ce4e /gui/image.cpp
parentRetain and display previous selection for image flashing (diff)
downloadandroid_bootable_recovery-f6ed8fc1f51e368bb76905d9f1d2d3735e70a644.tar
android_bootable_recovery-f6ed8fc1f51e368bb76905d9f1d2d3735e70a644.tar.gz
android_bootable_recovery-f6ed8fc1f51e368bb76905d9f1d2d3735e70a644.tar.bz2
android_bootable_recovery-f6ed8fc1f51e368bb76905d9f1d2d3735e70a644.tar.lz
android_bootable_recovery-f6ed8fc1f51e368bb76905d9f1d2d3735e70a644.tar.xz
android_bootable_recovery-f6ed8fc1f51e368bb76905d9f1d2d3735e70a644.tar.zst
android_bootable_recovery-f6ed8fc1f51e368bb76905d9f1d2d3735e70a644.zip
Diffstat (limited to 'gui/image.cpp')
-rw-r--r--gui/image.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/gui/image.cpp b/gui/image.cpp
index 2cf3b68af..60b1cb956 100644
--- a/gui/image.cpp
+++ b/gui/image.cpp
@@ -40,12 +40,8 @@ GUIImage::GUIImage(xml_node<>* node) : GUIObject(node)
child = node->first_node("image");
if (child)
{
- attr = child->first_attribute("resource");
- if (attr)
- mImage = PageManager::FindResource(attr->value());
- attr = child->first_attribute("highlightresource");
- if (attr)
- mHighlightImage = PageManager::FindResource(attr->value());
+ mImage = LoadAttrImage(child, "resource");
+ mHighlightImage = LoadAttrImage(child, "highlightresource");
}
// Load the placement
@@ -53,8 +49,8 @@ GUIImage::GUIImage(xml_node<>* node) : GUIObject(node)
if (mImage && mImage->GetResource())
{
- mRenderW = gr_get_width(mImage->GetResource());
- mRenderH = gr_get_height(mImage->GetResource());
+ mRenderW = mImage->GetWidth();
+ mRenderH = mImage->GetHeight();
// Adjust for placement
if (mPlacement != TOP_LEFT && mPlacement != BOTTOM_LEFT)
@@ -73,8 +69,6 @@ GUIImage::GUIImage(xml_node<>* node) : GUIObject(node)
}
SetPlacement(TOP_LEFT);
}
-
- return;
}
int GUIImage::Render(void)