diff options
Diffstat (limited to 'src/FbTk/Resource.cc')
-rw-r--r-- | src/FbTk/Resource.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/FbTk/Resource.cc b/src/FbTk/Resource.cc index 5fdc5f4..640bcd6 100644 --- a/src/FbTk/Resource.cc +++ b/src/FbTk/Resource.cc | |||
@@ -161,8 +161,20 @@ Resource_base *ResourceManager::findResource(const std::string &resname) { | |||
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
163 | 163 | ||
164 | string ResourceManager::resourceValue(const std::string &resname) { | 164 | const Resource_base *ResourceManager::findResource(const std::string &resname) const { |
165 | Resource_base *res = findResource(resname); | 165 | // find resource name |
166 | ResourceList::const_iterator i = m_resourcelist.begin(); | ||
167 | ResourceList::const_iterator i_end = m_resourcelist.end(); | ||
168 | for (; i != i_end; ++i) { | ||
169 | if ((*i)->name() == resname || | ||
170 | (*i)->altName() == resname) | ||
171 | return *i; | ||
172 | } | ||
173 | return 0; | ||
174 | } | ||
175 | |||
176 | string ResourceManager::resourceValue(const std::string &resname) const { | ||
177 | const Resource_base *res = findResource(resname); | ||
166 | if (res != 0) | 178 | if (res != 0) |
167 | return res->getString(); | 179 | return res->getString(); |
168 | 180 | ||