From f6ed8fc1f51e368bb76905d9f1d2d3735e70a644 Mon Sep 17 00:00:00 2001 From: that Date: Sat, 14 Feb 2015 20:23:16 +0100 Subject: gui: make resources type safe - add string, int, color and resource loading helpers - use typed resource classes, and some cleanup in loading code - remove abstract GetResource() to enforce type safe access - add height and width query methods to resources and use them - minor cleanup - simplify LoadPlacement Change-Id: I9b81785109a80b3806ad6b50cba4d893b87b0db1 --- gui/resources.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gui/resources.cpp') diff --git a/gui/resources.cpp b/gui/resources.cpp index d9f2741d7..e0016fc7b 100644 --- a/gui/resources.cpp +++ b/gui/resources.cpp @@ -314,7 +314,8 @@ void ResourceManager::LoadResources(xml_node<>* resList, ZipArchive* pZip) { LOGERR("Resource type (%s) not supported.\n", type.c_str()); } - if (res == NULL || res->GetResource() == NULL) + + if (res == NULL || !res->loadedOK()) { std::string res_name; if (child->first_attribute("name")) -- cgit v1.2.3