From 474cacf22fbbcd4825bb7a4ae63d1dfa55992433 Mon Sep 17 00:00:00 2001 From: that Date: Thu, 5 Mar 2015 20:25:39 +0100 Subject: gui: support string resources storing strings in a map (for fast lookup) in resource manager To define a string resource in : Hello To use a string, e.g.: %@foo% Not yet done: language-specific resources (should be solved not only for strings, but for all kinds of resources - e.g. for localized images) Change-Id: I3ba5cf5298c09e0d28a83973e9662f179271b33f --- gui/resources.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gui/resources.hpp') diff --git a/gui/resources.hpp b/gui/resources.hpp index 83fc7a537..0ce968427 100644 --- a/gui/resources.hpp +++ b/gui/resources.hpp @@ -3,7 +3,11 @@ #ifndef _RESOURCE_HEADER #define _RESOURCE_HEADER -#include "../minzip/Zip.h" +#include +#include +#include + +struct ZipArchive; extern "C" { #include "../minuitwrp/minui.h" @@ -94,11 +98,13 @@ public: FontResource* FindFont(const std::string& name) const; ImageResource* FindImage(const std::string& name) const; AnimationResource* FindAnimation(const std::string& name) const; + std::string FindString(const std::string& name) const; private: std::vector mFonts; std::vector mImages; std::vector mAnimations; + std::map mStrings; }; #endif // _RESOURCE_HEADER -- cgit v1.2.3