aboutsummaryrefslogtreecommitdiff
path: root/gui/ThemeEngine.h
diff options
context:
space:
mode:
authorMax Horn2009-06-06 23:22:22 +0000
committerMax Horn2009-06-06 23:22:22 +0000
commit8a0c5753f37c4af0ad5b3188d756e57c696d01d7 (patch)
tree7d2ea234ab1ea870422bc33d1ea71c89ec3c8771 /gui/ThemeEngine.h
parentf5e25f2152ac597f34a640b08f10bdd12c0f042d (diff)
downloadscummvm-rg350-8a0c5753f37c4af0ad5b3188d756e57c696d01d7.tar.gz
scummvm-rg350-8a0c5753f37c4af0ad5b3188d756e57c696d01d7.tar.bz2
scummvm-rg350-8a0c5753f37c4af0ad5b3188d756e57c696d01d7.zip
GUI: Simplified ThemeEngine::getImageSurface (this way it's easier to add more graphics in the future ;)
svn-id: r41309
Diffstat (limited to 'gui/ThemeEngine.h')
-rw-r--r--gui/ThemeEngine.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h
index dea3e07644..a8e63098fb 100644
--- a/gui/ThemeEngine.h
+++ b/gui/ThemeEngine.h
@@ -182,12 +182,10 @@ public:
kShadingLuminance //!< Converting colors to luminance for unused areas
};
- //! Special image ids for images used in the GUI
- enum kThemeImages {
- kImageLogo = 0, //!< ScummVM logo used in the launcher
- kImageLogoSmall, //!< ScummVM logo used in the GMM
- kImageSearch //!< Search tool image used in the launcher
- };
+ // Special image ids for images used in the GUI
+ static const char * const kImageLogo; //!< ScummVM logo used in the launcher
+ static const char * const kImageLogoSmall; //!< ScummVM logo used in the GMM
+ static const char * const kImageSearch; //!< Search tool image used in the launcher
/**
* Graphics mode enumeration.
@@ -422,17 +420,8 @@ public:
return _bitmaps.contains(name) ? _bitmaps[name] : 0;
}
- const Graphics::Surface *getImageSurface(const kThemeImages n) const {
- switch (n) {
- case kImageLogo:
- return _bitmaps.contains("logo.bmp") ? _bitmaps["logo.bmp"] : 0;
- case kImageLogoSmall:
- return _bitmaps.contains("logo_small.bmp") ? _bitmaps["logo_small.bmp"] : 0;
- case kImageSearch:
- return _bitmaps.contains("search.bmp") ? _bitmaps["search.bmp"] : 0;
- default:
- return 0;
- }
+ const Graphics::Surface *getImageSurface(const Common::String &name) const {
+ return _bitmaps.contains(name) ? _bitmaps[name] : 0;
}
/**