summaryrefslogtreecommitdiffstats
path: root/gui/image.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-02-18 21:35:00 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-02-21 15:14:24 +0100
commit21ff02a69331fbcd53dc93a1af9a93618225b4bf (patch)
tree623fe5a07a506362b91a16b34d62a875b3d45c32 /gui/image.cpp
parentgui: make kinetic scrolling deceleration more awesome (diff)
downloadandroid_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar
android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.gz
android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.bz2
android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.lz
android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.xz
android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.tar.zst
android_bootable_recovery-21ff02a69331fbcd53dc93a1af9a93618225b4bf.zip
Diffstat (limited to 'gui/image.cpp')
-rw-r--r--gui/image.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/gui/image.cpp b/gui/image.cpp
index 60b1cb956..8b43aaa34 100644
--- a/gui/image.cpp
+++ b/gui/image.cpp
@@ -27,9 +27,6 @@ extern "C" {
GUIImage::GUIImage(xml_node<>* node) : GUIObject(node)
{
- xml_attribute<>* attr;
- xml_node<>* child;
-
mImage = NULL;
mHighlightImage = NULL;
isHighlighted = false;
@@ -37,15 +34,11 @@ GUIImage::GUIImage(xml_node<>* node) : GUIObject(node)
if (!node)
return;
- child = node->first_node("image");
- if (child)
- {
- mImage = LoadAttrImage(child, "resource");
- mHighlightImage = LoadAttrImage(child, "highlightresource");
- }
+ mImage = LoadAttrImage(FindNode(node, "image"), "resource");
+ mHighlightImage = LoadAttrImage(FindNode(node, "image"), "highlightresource");
// Load the placement
- LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, NULL, NULL, &mPlacement);
+ LoadPlacement(FindNode(node, "placement"), &mRenderX, &mRenderY, NULL, NULL, &mPlacement);
if (mImage && mImage->GetResource())
{