summaryrefslogtreecommitdiffstats
path: root/gui/animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/animation.cpp')
-rw-r--r--gui/animation.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/gui/animation.cpp b/gui/animation.cpp
index 771e1c116..1e9a87d3f 100644
--- a/gui/animation.cpp
+++ b/gui/animation.cpp
@@ -43,9 +43,7 @@ GUIAnimation::GUIAnimation(xml_node<>* node) : GUIObject(node)
child = node->first_node("resource");
if (child)
{
- attr = child->first_attribute("name");
- if (attr)
- mAnimation = (AnimationResource*) PageManager::FindResource(attr->value());
+ mAnimation = LoadAttrAnimation(child, "name");
}
// Load the placement
@@ -77,8 +75,8 @@ GUIAnimation::GUIAnimation(xml_node<>* node) : GUIObject(node)
// Fetch the render sizes
if (mAnimation && mAnimation->GetResource())
{
- mRenderW = gr_get_width(mAnimation->GetResource());
- mRenderH = gr_get_height(mAnimation->GetResource());
+ mRenderW = mAnimation->GetWidth();
+ mRenderH = mAnimation->GetHeight();
// Adjust for placement
if (mPlacement != TOP_LEFT && mPlacement != BOTTOM_LEFT)