diff options
Diffstat (limited to 'gui/mousecursor.cpp')
-rw-r--r-- | gui/mousecursor.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/gui/mousecursor.cpp b/gui/mousecursor.cpp index 1c22356f9..625588629 100644 --- a/gui/mousecursor.cpp +++ b/gui/mousecursor.cpp @@ -58,19 +58,12 @@ void MouseCursor::LoadData(xml_node<>* node) child = node->first_node("background"); if(child) { - attr = child->first_attribute("color"); - if(attr) - ConvertStrToColor(attr->value(), &m_color); - - attr = child->first_attribute("resource"); - if(attr) + m_color = LoadAttrColor(child, "color", m_color); + m_image = LoadAttrImage(child, "resource"); + if(m_image) { - m_image = PageManager::FindResource(attr->value()); - if(m_image) - { - mRenderW = gr_get_width(m_image->GetResource()); - mRenderH = gr_get_height(m_image->GetResource()); - } + mRenderW = m_image->GetWidth(); + mRenderH = m_image->GetHeight(); } } |