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
diff --git a/gui/resources.cpp b/gui/resources.cpp
index d9f2741..e0016fc 100644
--- a/gui/resources.cpp
+++ b/gui/resources.cpp
@@ -314,7 +314,8 @@
{
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"))