summaryrefslogtreecommitdiffstats
path: root/gui/slider.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/slider.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 '')
-rw-r--r--gui/slider.cpp25
1 files changed, 7 insertions, 18 deletions
diff --git a/gui/slider.cpp b/gui/slider.cpp
index 98d2ddea3..c53dabc28 100644
--- a/gui/slider.cpp
+++ b/gui/slider.cpp
@@ -47,31 +47,20 @@ GUISlider::GUISlider(xml_node<>* node) : GUIObject(node)
child = node->first_node("resource");
if (child)
{
- attr = child->first_attribute("base");
- if (attr)
- sSlider = PageManager::FindResource(attr->value());
-
- attr = child->first_attribute("used");
- if (attr)
- sSliderUsed = PageManager::FindResource(attr->value());
-
- attr = child->first_attribute("touch");
- if (attr)
- sTouch = PageManager::FindResource(attr->value());
+ sSlider = LoadAttrImage(child, "base");
+ sSliderUsed = LoadAttrImage(child, "used");
+ sTouch = LoadAttrImage(child, "touch");
}
// Load the placement
LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY);
- if (sSlider && sSlider->GetResource())
- {
- mRenderW = gr_get_width(sSlider->GetResource());
- mRenderH = gr_get_height(sSlider->GetResource());
- }
+ mRenderW = sSlider->GetWidth();
+ mRenderH = sSlider->GetHeight();
if (sTouch && sTouch->GetResource())
{
- sTouchW = gr_get_width(sTouch->GetResource()); // Width of the "touch image" that follows the touch (arrow)
- sTouchH = gr_get_height(sTouch->GetResource()); // Height of the "touch image" that follows the touch (arrow)
+ sTouchW = sTouch->GetWidth(); // Width of the "touch image" that follows the touch (arrow)
+ sTouchH = sTouch->GetHeight(); // Height of the "touch image" that follows the touch (arrow)
}
//LOGINFO("mRenderW: %i mTouchW: %i\n", mRenderW, mTouchW);